Hi all, I wanted to test for the appetite to change the current default behavior of the IP address lookup policy on dual-stack (IPv4+IPv6) systems.
The default evaluated in InetAddress.initializePlatformLookupPolicy() yields 'IPV4_FIRST' to return IPv4 addresses before IPv6 addresses unless 'java.net.preferIPv6Addresses' is set to 'true'. I wonder whether this could be changed to the system default, relying on what 'getaddrinfo' returns? This would make Java compliant with RFC 6724, which (strongly) recommends to yield IPv6 addresses first. Naively speaking, it can be confusing if something like 'curl' or 'wget' connect via IPv6, but any Java application connects via IPv4. Although it's a tiny code change, it would be a "big" or "surprising" behavior change. Therefore I think, if there's appetite for such a change, it would need to go into one of the next major releases. WDYT? Cheers, Robert
