JDK-7144274 : [macosx] Default IPv6 multicast interface is not being set when calling MulticastSocket.joinGroup()
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7u4,8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x,solaris
  • CPU: generic,x86
  • Submitted: 2012-02-09
  • Updated: 2012-04-30
  • Resolved: 2012-04-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u4 b13Fixed 8Fixed
Related Reports
Duplicate :  
Relates :  
Description
When calling the method MulticastSocket.joinGroup(InetAddress mcastaddr), the default interface for the address is not being set correctly for an IPv6 address, as a result of which the method call results in java.net.SocketException: Can't assign requested address.
test/java/net/MulticastSocket/NoLoopbackPackets.java is an example regression test that causes this exception.

Comments
EVALUATION The following changeset introduces a utility function to retrieve a default networking interface. Depending on whether the OS is Mac OS X, the native call for joinGroup() then extracts the default interface if nothing is set. Changeset: 99cc5c9ef200 Author: khazra Date: 2012-02-15 15:49 +0000 URL: http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/99cc5c9ef200 7144274: [macosx] Default IPv6 multicast interface is not being set when calling MulticastSocket.joinGroup() Reviewed-by: chegar, alanb ! src/solaris/native/java/net/PlainDatagramSocketImpl.c ! src/solaris/native/java/net/net_util_md.c
15-02-2012