Skip to content

Commit fd387d8

Browse files
committed
fix(dns): Dynamic DNS sorting so AF_UNSPEC works in IPv6-only network
This fix adds an option to dynamically set the order based on whether an the host has a global (or ULA) IPv6 address, allowing a device with both IPv4 and IPv6 enabled to work in any network configuration, including IPv4-only, IPv6-only, and dual-stack. Without the option there is a static ordering preferring IPv4, which means on an IPv6-only network, a dual-stack destination returns the IPv4 address, which fails. Setting the static preference to IPv6 would have the opposite problem. A dynamic sort, based on available source addresses, is required to work on all networks.
1 parent f792214 commit fd387d8

File tree

1 file changed

+372
-11
lines changed

1 file changed

+372
-11
lines changed

0 commit comments

Comments
 (0)