Skip to content

Commit 64c5280

Browse files
rscbradfitz
authored andcommitted
net/http: fix dns hijacking test
The name lookups are unrooted; the test should be unrooted too. Correctly skips the tests if the DNS config specifies a domain suffix that has a wildcard entry causing all unrooted names to resolve. Change-Id: I80470326a5d332f3b8d64663f765fd304c5e0811 Reviewed-on: https://go-review.googlesource.com/36253 Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 57546d6 commit 64c5280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/http/transport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3436,7 +3436,7 @@ func skipIfDNSHijacked(t *testing.T) {
34363436
// DNS server hijacking queries.
34373437
// See issues 16732, 16716.
34383438
isDNSHijackedOnce.Do(func() {
3439-
addrs, _ := net.LookupHost("dns-should-not-resolve.golang.")
3439+
addrs, _ := net.LookupHost("dns-should-not-resolve.golang")
34403440
isDNSHijacked = len(addrs) != 0
34413441
})
34423442
if isDNSHijacked {

0 commit comments

Comments
 (0)