Discussion:
Code Review 6882910: Unexplained lack of IP4 network ability when transparent IP6 to IP4 is disabled.
Chris Hegarty
2010-08-09 15:12:58 UTC
Permalink
Alan,

Don't assume sockets will default to dual stack, explicitly set
IPV6_V6ONLY to 0. Apparently some Linux distros ship with
net.ipv6.bindv6only=1 restricting sending and receiving to IPv6 packets
only. Changes both net and nio code.

Webrev:
http://cr.openjdk.java.net/~chegar/6882910/webrev.00/webrev/

Thanks,
-Chris.
Alan Bateman
2010-08-09 18:29:43 UTC
Permalink
Post by Chris Hegarty
Alan,
Don't assume sockets will default to dual stack, explicitly set
IPV6_V6ONLY to 0. Apparently some Linux distros ship with
net.ipv6.bindv6only=1 restricting sending and receiving to IPv6
packets only. Changes both net and nio code.
http://cr.openjdk.java.net/~chegar/6882910/webrev.00/webrev/
Thanks,
-Chris.
The changes look okay to me. I assume the bulk of our existing tests
will fail if we run on a system has IPV6_V6ONLY enabled by default (and
so a new test isn't required for this fix). One small suggestion is just
to add a comment to explain why the socket option needs to be disabled.

-Alan.
Chris Hegarty
2010-08-10 11:09:24 UTC
Permalink
Post by Alan Bateman
Post by Chris Hegarty
Alan,
Don't assume sockets will default to dual stack, explicitly set
IPV6_V6ONLY to 0. Apparently some Linux distros ship with
net.ipv6.bindv6only=1 restricting sending and receiving to IPv6
packets only. Changes both net and nio code.
http://cr.openjdk.java.net/~chegar/6882910/webrev.00/webrev/
Thanks,
-Chris.
The changes look okay to me. I assume the bulk of our existing tests
will fail if we run on a system has IPV6_V6ONLY enabled by default (and
This is correct. We have many many failures of existing tests on
platforms with IPV6_V6ONLY enabled by default.
Post by Alan Bateman
so a new test isn't required for this fix). One small suggestion is just
to add a comment to explain why the socket option needs to be disabled.
Updated webrev (added comment):
http://cr.openjdk.java.net/~chegar/6882910/webrev.01/webrev/

Thanks,
-Chris.
Post by Alan Bateman
-Alan.
Dr Andrew John Hughes
2010-08-10 11:26:02 UTC
Permalink
Alan,
Don't assume sockets will default to dual stack, explicitly set IPV6_V6ONLY
to 0. Apparently some Linux distros ship with net.ipv6.bindv6only=1
restricting sending and receiving to IPv6 packets only. Changes both net and
nio code.
 http://cr.openjdk.java.net/~chegar/6882910/webrev.00/webrev/
Thanks,
-Chris.
6342561 is also related to this; see
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008866.html
--
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
Chris Hegarty
2010-08-10 11:36:51 UTC
Permalink
Post by Dr Andrew John Hughes
Alan,
Don't assume sockets will default to dual stack, explicitly set IPV6_V6ONLY
to 0. Apparently some Linux distros ship with net.ipv6.bindv6only=1
restricting sending and receiving to IPv6 packets only. Changes both net and
nio code.
http://cr.openjdk.java.net/~chegar/6882910/webrev.00/webrev/
Thanks,
-Chris.
6342561 is also related to this; see
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008866.html
Thanks Andew, I'll close this CR as a dup of 6882910.

-Chris.
Alan Bateman
2010-08-10 11:44:28 UTC
Permalink
Post by Dr Andrew John Hughes
6342561 is also related to this; see
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008866.html
Yes, it seems to be the same issue although 6342561 it seems to have
been submitted to a java_plugin category for some reason. We've always
assumed that IPV6_V6ONLY is disabled, probably because the original RFC
for the IPv6 socket extensions did require it to be disabled by
default. I looked briefly at the patch in the above but it seems to be
changing linux_close. That code is to support asynchronous close and
isn't really the right place to try to fix this. Also, it doesn't look
to be complete (missing ServerSocket, DatagramSocket, and NIO??).

-Alan.

Loading...