JDK-8233191 : MulticastSocket joinGroup/leaveGroup do not specify their behavior when the outgoing interface has not been set
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-30
  • Updated: 2020-02-12
  • Resolved: 2019-12-09
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 14
14 b27Fixed
Related Reports
Blocks :  
Blocks :  
CSR :  
Description
The 2-arg joinGroup/leaveGroup methods are specified to use the interface set by setNetworkInterface (or setInterface) when invoked with netIf==null. These methods do not specify how they should behave when the outgoing interface for multicast datagrams has not been set. It would not be unreasonable for these methods to throw SocketException although this would be a small behavioral compatibility issue as the long standing (and unspecified behavior) has been to pick a random interface.

While in the area, the getNetworkInterface (and getInterface) do not specify what they return when an outgoing interface for multicast datagrams has not been set. The long standing behavior has been to return a "useless" network interface (or anyLocalAddress).


Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/8df91a722672 User: pconcannon Date: 2019-12-09 15:58:42 +0000
09-12-2019

Implementing JDK-8233191 will be much easier once JDK-8233307 has been fixed.
15-11-2019

Isn't there (or shouldn't there be) different behaviors depending on IPv4/IPv6? I mean - IPv6 addresses (bind address / group address) may have a scope that could influence which network interface gets picked?
31-10-2019