JDK-8223532 : Don't try creating IPv4 sockets in NetworkInterface.c if IPv4 is not supported
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-07
  • Updated: 2019-05-20
  • Resolved: 2019-05-15
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 13
13 b21Fixed
Description
There are a couple of functions in src/java.base/unix/native/libnet/NetworkInterface.c which try to create IPv4 sockets, then check if errno is EPROTONOSUPPORT. If errno is EPROTONOSUPPORT, then IPv6 is tried, else it immediately bails.

We have a kernel that returns EAFNOSUPPORT when IPv4 is disabled and there is an attempt to create an AF_INET socket.