Conversation
KeCheng2022
commented
Sep 27, 2022
- ipv4 : ignore IPv6 addresses in DNS response
- ipv6 : ignore IPv4 addresses in DNS response
- any : accept both IPv4 and IPv6 addresses in DNS response
|
good work, but before we discuss merging this let's first talk about your usecase, and whether that usecase could be handled automatically in a sane way. whenever possible we should try to prefer sane defaults over additional config items. |
- ipv4 : ignore IPv6 addresses in DNS response - ipv6 : ignore IPv4 addresses in DNS response - any : accept both IPv4 and IPv6 addresses in DNS response
|
For our devices, the IPv6 traffic path is not supported yet. From the users' perspective, there would be obvious network performance issues. |
this appears to be more of a configuration issue than anything else. the canonical solution to that would appear to be if the system is configured like this, the DNS resolver will not return ipv6 results. as far as automatically selecting the best DNS reponse is concerned, we could just always request DNS results with AF_UNSPEC and then iterate over the results once trying to find an address that matches the address family that was specified for the listen address (or eventually bind addresses), and if none matching were encountered, just use the first response record. how and whether to prefer listen or bind addresses for this strategy would need some discussion. |