-
Notifications
You must be signed in to change notification settings - Fork 18k
net: pure Go resolver(netdns) can not resolve hostname.local #35067
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
Comments
Yes, that's known, as the docs at https://golang.org/pkg/net/#hdr-Name_Resolution imply, and we're unlikely to implement it. If you need to resolve those names, use a different resolver. |
@bradfitz Hi, thanks for your reply . I know sth about this before writing the issue. Could u plz tell me why not to implement it ? What is the consideration? |
It's a lot of code for very few users and the system DNS resolver is usually fine. The advantage of using the pure Go resolver is usually to avoid cgo and expensive threads being tied up during resolution, but that only matters when you have, say, tens of thousands of outstanding lookups. (e.g. you're a web crawler binary) But if you have tens of thousands of mDNS lookups outstanding, you probably have bigger problems on your LAN. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
sounds like a won't fix. |
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?
Just run
GODEBUG=netdns=go+4 go run test.go
What did you expect to see?
Resolve to
127.0.0.1
What did you see instead?
resolve mac.local failed: dial tcp: lookup mac.local on 10.22.12.45:53: no such host
The text was updated successfully, but these errors were encountered: