Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: macOS DNS resolver is returning "Additional Section" entries as answers to host lookups #20904
This is go version 1.8.3 on MacOS 10.12.5.
While debugging a problem with https://github.com/bazelbuild/rules_webtesting code, I found that the return value of
I think this is incorrect, but I'm not completely sure.
The DNS server in this case is a weird DSL modem thing that I can't control. In the Additional Section, the server is returning an A record with the same name as the A record in the Answer section but with an IP address pointing at the gateway machine. (I don't know why it does this, but I think its related to the weird way it sometimes it redirects you to a public site to configure it.)
The first IP address returned is the gateways, so the rules_webtesting code points its HTTP client at that and it, of course, fails.
This is the Go code: https://play.golang.org/p/epgikfuKRG
And it prints out:
And here's the equivalent dig commands:
Can you please show us the output of the following:
Sorry, I'm still tying to capture your point, but looks like
Thanks for the response!
To your questions: Oh, no, no, sorry, I meant "local resolver" as in "running on the same hardware" instead of "local to the network". Shouldn't have included any of that, really! A mental artifact of how I'd been debugging problems while getting to this issue that got jammed in there
Here's that output (it's a little interesting!):
changed the title
macOS DNS resolver is returning "Additional Section" entries as answers to host lookups
Jul 5, 2017
Sorry for being late.
Well, it looks like the situation is a bit complicated.
#22826 might be a workaround for your specific, node-local scope issue, though I guess that there is nothing that we can do effectively and generally for now.