-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPv6 syntax error in example_test: dial udp: address <IPv6 address>:53: too many colons in address #1365
Comments
gsejourne
pushed a commit
to gsejourne/dns
that referenced
this issue
Apr 15, 2022
gsejourne
pushed a commit
to gsejourne/dns
that referenced
this issue
Apr 15, 2022
miekg
added a commit
that referenced
this issue
Apr 15, 2022
aanm
pushed a commit
to cilium/dns
that referenced
this issue
Jul 29, 2022
Small fix in the examples to properly work with v6 addresses. Closes: miekg#1365 miekg#1367 Signed-off-by: Miek Gieben <miek@miek.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
Run into an error trying to use the sample ExampleMX() function in example_test.go:
dns/example_test.go
Line 19 in 08c2616
It fails with the following error:
dial udp: address <my_v6_address>:53: too many colons in address
This is most likely due to
r, _, err := c.Exchange(m, config.Servers[0]+":"+config.Port)
as my main resolver address is a V6 --
here's the excerpt from my resolv.conf (note: untouched, and OS X populated, so potentially highly reproducible):
`
search home
nameserver v6 address here
nameserver 192.168.1.1
`
Since the c.Exchange() function is trying config.Servers[0], it fails, as it expects the v6 address to be in [].
The text was updated successfully, but these errors were encountered: