On Wed, 1 Mar 2023 18:31:41 GMT, Rich DiCroce <d...@openjdk.org> wrote:
>> src/java.base/windows/native/libnet/ResolverConfigurationImpl.c line 190: >> >>> 188: flags |= GAA_FLAG_SKIP_MULTICAST; >>> 189: flags |= GAA_FLAG_SKIP_FRIENDLY_NAME; >>> 190: flags |= GAA_FLAG_INCLUDE_ALL_INTERFACES; >> >> Is this needed? As far as I could tell, we only retrieve DNS addresses here, >> and we only want the DNS servers associated with usable interfaces. > > Probably not. I took a closer look at the docs for GetAdaptersAddresses, and > spotted this section that I missed before: > >> If the GAA_FLAG_INCLUDE_ALL_INTERFACES is set, then all NDIS adapters will >> be retrieved even those addresses associated with adapters not bound to an >> address family specified in the Family parameter. When this flag is not set, >> then only the addresses that are bound to an adapter enabled for the address >> family specified in the Family parameter are returned. > > So it sounds like GAA normally only returns interfaces that have IP addresses > associated with them. Should I revert this change? Yes I think so. This change doesn't provide any obvious benefit, so let's revert it. ------------- PR: https://git.openjdk.org/jdk/pull/12593