-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
net: macOS DNS resolver is returning "Additional Section" entries as answers to host lookups #20904
Comments
(Using |
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!):
|
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. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
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
os.Hostname
("iMac", in this case) when passed tonet.LookupHost
will return the IP address of both the A record in the dig-equivalent Answer Section, but also A records in the dig-equivalent Additional Sectional. This is causing the rules_webtesting code fail when it tries to connect locally.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:
The text was updated successfully, but these errors were encountered: