-
Bug
-
Resolution: Unresolved
-
P4
-
15, 18, 23
https://stackoverflow.com/questions/68769776/socketexception-when-calling-setnetworkinterface-on-a-multicastsocket-with-an-ip
The environment is Windows with IPv6 enabled but disabled on a specific network interface, say "eth1".
A DatagramChannel (or DatagramSocket or MulticastSocket) to an IPv6 socket is created. The setOption method is invoked to set the outgoing interface for multicast datagrams to be "eth1". The expectation is that it should succeed because it has IPv4 enabled but it fails because IPv6 is disabled.
The issue can be worked by running with IPv6 disabled (-Djava.net.preferIPv4Stack=true). For DatagramChannel, the issue can be worked around by specifying the INET protocol family when creating the DatagramChannel. For MulticastSocket, the issue can be worked around in JDK 15 to 17 by running with the old DatagramSocketImpl (-Djdk.net.usePlainDatagramSocketImpl=true).
- duplicates
-
JDK-8278122 Several network tests fail on Windows if no IPv6 is configured on network interface
-
- Closed
-
-
JDK-8282522 Error in method setNetworkInterface of MulticastSocket class
-
- Closed
-
- relates to
-
JDK-8236184 (dc) IP_MULTICAST_* and IP_TOS socket options not effective
-
- Resolved
-
-
JDK-8235674 JEP 373: Reimplement the Legacy DatagramSocket API
-
- Closed
-
-
JDK-8328615 Various java.net and java.nio tests fail with Invalid argument: setsockopt on Ipv6 able machine without Ipv6 interface
-
- Open
-
-
JDK-8282522 Error in method setNetworkInterface of MulticastSocket class
-
- Closed
-