7026376: (dc) DatagramChannel created without specifying protocol family fails to join IPv4 group
Alan Bateman
Alan.Bateman at oracle.com
Mon Mar 14 06:35:26 PDT 2011
This is a small fix to the mulitcast support in DatagramChannel. If
someone creates a DatagramChannel without specifying the protocol family
then they get a DatagramChannel to an IPv6 socket if IPv6 is enabled. If
they then attempt to join an IPv4 multicast group then it may succeed or
may fail (the spec is clear that there is no guarantee that a channel to
a socket in one protocol family can join a multicast group with an
address that corresponds to another protocol family). When not supported
then the exception today is not clear. The change here ensures that
IllegalArgumentException is thrown with a clear message detail when not
supported and for Linux, changes the implementation to use Net.join4
rather than Net.join6 for this case. The webrev with the changes is here:
http://cr.openjdk.java.net/~alanb/7026376/webrev/
Thanks,
Alan
More information about the nio-dev
mailing list