-
Notifications
You must be signed in to change notification settings - Fork 18k
net: defaultNS contains ipv6 address #70843
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
please show a real problem of probing for a dns server on localhost over ipv6 |
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
Also please note that this is just a fallback, in most case it is not going to be used, it is overwritten by |
Following error appears when some CI-CD builds fails [when docker pulls fail because of this]: [::1]:53: dial udp [::1]:53: socket: address family not supported by protocol These uses golang under the hood ip -6 addr #shows nothing |
@shyamsundar87 can you try with |
I saw following code somewhere : $ GODEBUG=netdns=cgo+2 go run main.go
go package net: confVal.netCgo = true netGo = false
go package net: using cgo DNS resolver Im very new to golang.
Some users could've unlinked the file when they're using some other resolvers. |
it sounds to me that this isn't a real issue. as mentioned above, this is a fallback that we try when other resolvers aren't configured (and these defaults won't work in docker anyway because there isn't a local dns client). if you've broken dns resolution in the environment, you have bigger issues. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
I dont really see this fixing the root stuff. First of all this really takes away the user's freedom to choosing their own IP stack for whatever TCP/UDP they use for networking. |
Go version
go version go1.23.0
Output of
go env
in your module/workspace:What did you do?
As following file :
https://github.com/golang/go/blob/master/src/net/dnsconfig.go
has :
It by-default assumes to listen for IPv6 addresses without properly sanitizing if at all IPv6 is enabled through-out in the system.
This causes lots of bottlenecks in wide varieties of other programs that depends on Golang's infrastructure.
What did you see happen?
It by-default assumes to listen for IPv6 addresses without properly sanitizing if at all IPv6 is enabled through-out in the system.
This causes lots of bottlenecks in wide varieties of other programs that depends on Golang's infrastructure.
What did you expect to see?
Better design would be to check if ipv6 is enabled system-wide and then really use
if not fallback to
The text was updated successfully, but these errors were encountered: