aboutsummaryrefslogtreecommitdiff
path: root/src/net/dnsclient_unix_test.go
diff options
context:
space:
mode:
authorTom Wilkie <tom@weave.works>2016-08-17 10:13:03 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2016-08-17 17:14:26 +0000
commit289df4e6e65466716aaf1cf65fcfdedada2a5599 (patch)
tree94b5c60b82ff089cf53bb5a5ef8a38908261283e /src/net/dnsclient_unix_test.go
parent73fdba2601f1aeaa6565cfb03e4c5c8c98489b7a (diff)
downloadgo-289df4e6e65466716aaf1cf65fcfdedada2a5599.tar.gz
go-289df4e6e65466716aaf1cf65fcfdedada2a5599.zip
net: don't avoid resolving .local addresses
.local addresses are used by things like Kubernetes and Weave DNS; Go should not avoid resolving them. This is a partial revert of https://golang.org/cl/21328 which was too strict of an interpretation of RFC 6762. Fixes #16739 Change-Id: I349415b4eab5d61240dd18217bd95dc7d2105cd5 Reviewed-on: https://go-review.googlesource.com/27250 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/dnsclient_unix_test.go')
-rw-r--r--src/net/dnsclient_unix_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go
index 09bbd48866..c953c1efaf 100644
--- a/src/net/dnsclient_unix_test.go
+++ b/src/net/dnsclient_unix_test.go
@@ -112,10 +112,11 @@ func TestAvoidDNSName(t *testing.T) {
{"foo.ONION", true},
{"foo.ONION.", true},
- {"foo.local.", true},
- {"foo.local", true},
- {"foo.LOCAL", true},
- {"foo.LOCAL.", true},
+ // But do resolve *.local address; Issue 16739
+ {"foo.local.", false},
+ {"foo.local", false},
+ {"foo.LOCAL", false},
+ {"foo.LOCAL.", false},
{"", true}, // will be rejected earlier too