On 16/04/2019 22:34, Arthur Eubanks wrote:
Hi,

Copied from the bug https://bugs.openjdk.java.net/browse/JDK-8222562:
Some of the networking code tries to support dual socket support. However, it doesn't work with IPv6 only systems.

setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, 0) returns a failure with errno EAFNOSUPPORT, and then the networking code bails. It should not bail when it sees that trying to set IPV6_V6ONLY fails.

webrev: http://cr.openjdk.java.net/~aeubanks/ipv6setsockopt/webrev.00/index.html

One thing to note is that similar code exists in the Windows part of the networking code (e.g. java.base/windows/native/libnet/PlainSocketImpl.c), but I don't know how to test Windows code so I'm only touching the Unix-specific part.

This code is compiled on other Unix-like ports too so I think we should at least try to see if they also return EAFNOSUPPORT when configured for IPv6-only.

-Alan

Reply via email to