JDK-8280121 : Revisit IPSupport::hasIPv4 to return false in case where no network interfaces supporting IPv4 is found.
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-01-18
  • Updated: 2022-01-18
Related Reports
Blocks :  
Description
The test java/net/NetworkInterface/IPv4Only.java  has been observed failing on some IPv6 environment with the following exception:

java.net.SocketException: No network interfaces configured
	at java.base/java.net.NetworkInterface.getNetworkInterfaces(NetworkInterface.java:357)
	at IPv4Only.main(IPv4Only.java:40)

The implementation of IPSupport.hasIPv4() should probably be revisited. Typically it might be revisited to return false in cases where no network interface supporting IPv4 is found.