Request for Review 6887364 [SetOutgoingIf]
Christopher Hegarty -Sun Microsystems Ireland
Christopher.Hegarty at Sun.COM
Thu Oct 1 08:54:10 PDT 2009
Hi Pavel, Michael,
6887364: SetOutgoingIf.java fails if run on multihomed machine without
PIv6 on all interfaces [more details below]
Webrev:
http://cr.openjdk.java.net/~chegar/6887364/webrev/
I just realized why this test was failing on one of our lab machines.
The reason is that the test tries to join both IPv4 and IPv6 multicast
groups on network interfaces that are not loopback, are Up, and support
multicast. On our machine we have one interface that has only an IPv4
address assigned to it, while another has both IPv4 and Ipv6 addresses.
I've changed the test to only try joining the appropriate multicast
group if the network interface supports that IP protocol.
Also, I noticed that the IPv4 mapped IPv6 address the test runs with
actually gets converted to a regular Inet4Address because the
InetAddress factory method is smarter than us! It never creates
Inet6Address instances that are IPv4 mapped IPv6 addresses, it just
creates Inet4Address. So (controversially) I manufactured an
Inet6Address multicast instance manually. It seems to work fine.
--------------
Details of failure and machine configuration:
Fails with:
Exception in thread "main" java.net.SocketException: No such device
or address
at java.net.PlainDatagramSocketImpl.join(Native Method)
at
java.net.AbstractPlainDatagramSocketImpl.joinGroup(AbstractPlainDatagramSocketImpl.java:184)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:382)
at SetOutgoingIf.main(SetOutgoingIf.java:116)
Machine configuration [IP address information removed for security reasons]:
:> ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet XXX.XXX.XXX.160 netmask ffffff00 broadcast XXX.XXX.XXX.255
bge3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 5
inet XXX.XXX.YYY.160 netmask ffffff00 broadcast XXX.XXX.YYY.255
bge0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
inet6 fe80::214:4fff:fe7a:b734/10
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu
8252 index 1
inet6 ::1/128
---------------
-Chris.
More information about the net-dev
mailing list