United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7144274 [macosx] Default IPv6 multicast interface is not being set when calling MulticastSocket.joinGroup()
JDK-7144274 : [macosx] Default IPv6 multicast interface is not being set when calling MulticastSocket.joinGroup()

Details
Type:
Bug
Submit Date:
2012-02-09
Status:
Closed
Updated Date:
2012-04-30
Project Name:
JDK
Resolved Date:
2012-04-11
Component:
core-libs
OS:
solaris,os_x
Sub-Component:
java.net
CPU:
x86,generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7u4,8
Fixed Versions:
7u4 (b13)

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

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
                                     
2012-02-15



Hardware and Software, Engineered to Work Together