4 ms·
> It has issues when there's an IPv6 address up (even link-local) but no egress v6 routing. I have multiple FreeBSD machines, all of them with IPv6 up on link-
by ArchOversight 4y ago
> It has issues when there's an IPv6 address up (even link-local) but no egress v6 routing.
I have multiple FreeBSD machines, all of them with IPv6 up on link-local, and pkg doesn't hang at all. Even without valid globally unique IPv6 addressing, but valid ULA addressing (unique local address) and valid routing for IPv6 on an internal network, no issues.
It sounds like you've got some globally unique IPv6 addresses assigned to an interface somewhere and address selection (and thus the addresses returned from getaddrinfo) will return IPv6 first and try that before falling back to IPv4.
You can configure this address selection by using the ip6addrctl tool which will allow you to validate and change that address selection.
It is based upon https://www.rfc-editor.org/rfc/rfc3484 https://www.rfc-editor.org/rfc/rfc3484
FreeBSD also has predefined policies you can set in /etc/rc.conf:
ip6addrctl_enable="YES" # Set to YES to enable default address selection
ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages
ip6addrctl_policy="AUTO" # A pre-defined address selection policy
# (ipv4_prefer, ipv6_prefer, or AUTO)
- voytec 4y ago> It sounds like you've got some globally unique IPv6 addresses assigned to an interface somewhere Single inet6 address up is fe80::xxx. My outdated ISP does not provide any v6 connectivity. But my cellular (other) ISP provides v6 and I use tethering while traveling, so would like to avoid disabling INET6. > addresses returned from getaddrinfo) will return IPv6 first and try that before falling back to IPv4. It's random with no v6 preference. ping6 fails immediately upon attempt to reach outside world: ping6: UDP connect: No route to host ping6 2606:4700:4700::1111 0.00s user 0.00s system 50% cpu 0.005 total And here's an example[1] of how how pkg hangs for about a minute when it selects unreachable v6 address. [1] https://bsd.to/NuYu/raw https://bsd.to/NuYu/raw