-
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: Dial does not respond to quickly-broken IPv6 connections by falling back to IPv4 #68237
Comments
That's not proof that IPv6 is disabled, only that |
It is, I assure you.
Still, go should not pick the AAAA address. Or, at least, it should not do so unconditionally, because I don't think our setup is uniquely broken. :-) |
From the output it is clear that the cgo resolver is being used, so out of our scope. |
https://danp.net/posts/macos-dns-change-in-go-1-20/ This had started happening relatively recently and I believe it is caused by changes above. |
Can you try forcing the go resolver and see if it helps in your case? |
How do I enable both this feature and dns debug so we can see it is used for real? |
|
Tough luck:
|
For reference, curl does this: % curl -v https://proxy.golang.org/nhooyr.io/websocket/@v/list
|
What if you pass --ipv6 to curl? In theory go's network stack should also be doing fast fallback / dual stack ipv4 and ipv6 |
So the tittle is incorrect, it resolves correctly, but it fails to connect to the server when ipv6 is unavail, right? |
curl gets stuck when forced to use ipv6. It may be that despite underlying adapter has ipv6 disabled, the Cisco vpn client pretends it's got an ipv6 address on the utun interface. Yet it causes no issues anywhere, everything works fine apart from go. % curl -v --ipv6 https://proxy.golang.org/nhooyr.io/websocket/@v/list
|
The address is of course correct, it's the action of resolving the AAAA and sticking to it rather than resolving A is incorrect. :-) |
From the discussion so far, it sounds like:
Normally, when IPv6 addresses can't be used, the connect never succeeds (fails or times out). In your case, it appears that the connect is succeeding but then the connection breaks very quickly after that, perhaps on the first write. Do you know of anything strange about your Mac's network or IPv6 configuration? Or some firewall that is actively breaking IPv6 connections? For example on my Mac:
|
The problem only happens with VPN enabled, I mentioned it before. The VPN in question is Cisco secure client, aka AnyConnect. I'm working with people who manage the Cisco VPN for us to see if they can change anything on their side (AnyConnect is supposed to be server side controlled, so not much can be done on the client side).
|
@rsc I get the same issue when trying to install things using 1.22.6 on my MacBook while on our corporate VPN (which is also Cisco AnyConnect). My testing reveals there are two underlying issues:
Increasing the dialer's |
Go version
go version go1.22.4 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Trying to fetch a random module (all break the same):
Machine has IPv6 disabled:
What did you see happen?
Go get is unable to fetch a module because it's using a wrong proxy address.
What did you expect to see?
Go get should be able to fetch a module.
The text was updated successfully, but these errors were encountered: