net: AAAA DNS queries are made despite ip4 on LookupIP #44809
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The following snippets may not run on golang playground, maybe they restrict network connections?
I prepared the following snippet(https://play.golang.org/p/CTmnriuHXcU), run it with a network sniffer turned on, I used Wireshark with the filter "udp port 53" so I only capture DNS traffic.
There are two DNS queries being made, A, and AAA, this should not happen. I thought this may be reproducible on the default resolver too, so I prepared this other snipped(https://play.golang.org/p/6wIdTxjI4dd), it does not make the AAA DNS query, this shows it is a bug, because if it was by design then I would have expected both snippets to behave the same.
What did you expect to see?
If I ask for an A DNS record, why am I making a query for AAA (ip6)?
What did you see instead?
Two DNS queries, one for IP4(A) and other for IP6 (AAA).
The text was updated successfully, but these errors were encountered: