[RFR]: 8222562: IPv6 only systems fail on setsockopt(IPV6_V6ONLY, 0)

Arthur Eubanks aeubanks at google.com
Tue Apr 16 21:34:45 UTC 2019


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.

Running this through the submit repo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190416/e5e15e24/attachment.html>


More information about the net-dev mailing list