AI_ADDRCONFIG can be beneficial to applications when it's only used for the connect(), sendto(), etc. See a detailed description of this topic: https://fedoraproject.org/wiki/Networking/NameResolution/ADDRCONFIG The defaults are only used when an application doesn't supply hints. But, virtually any application that wants to connect() wants to also specify at least the transport protocol (TCP, UDP). That means that applications that would benefit from AI_ADDRCONFIG won't use the defaults anyway.
Created attachment 6793 [details] getaddrinfo: use zero ai_flags by default According to POSIX1-2008, AI_V4MAPPED flag shall be ignored unless ai_family equals AF_INET6. In the default hints, ai_family is AF_UNSPEC. Therefore AI_V4MAPPED is redundant. AI_ADDRCONFIG can potentially be beneficial to applications that use getaddrinfo() results to immediately call connect(), sendto() and similar functions to avoid querying redundant DNS records according to the current address configuration. Those applications will also need to specify ai_socktype and/or ai_protocol and therefore will not use hints=NULL. As AI_DEFAULT is not a part of the public API, such applications will not be able to use the default flags at all. Please note that POSIX1-2008 doesn't define any default flags at all. Resolves: #14415, #14965