JDK-8280546 : Remove hard-coded 127.0.0.1 loopback address
  • Type: Sub-task
  • Component: security-libs
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-25
  • Updated: 2024-04-01
  • Resolved: 2022-01-26
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 11 JDK 17 JDK 19
11.0.24-oracleFixed 17.0.12-oracleFixed 19 b08Fixed
Description
This bug is a continuation of JDK-8220083

Some of the JDK networking tests hard-code as the 127.0.0.1 loopback address. This works on IPv4 or IPv6&IPv4 network. However, with IPv6-only network, those tests with hard-coded address fail. The following fix would work for IPv4, IPv6&IPv4, and IPv6-only environment:

- so = new Socket("127.0.0.1", port);
+ so = new Socket(InetAddress.getLoopbackAddress(), port);

The following tests are still affected:

* jdk/javax/net/ssl/TLS/TestJSSE.java
* jdk/javax/net/ssl/sanity/interop/JSSEClient.java
Comments
Fix request [11u] I backport this for parity with 11.0.24-oracle. No risk, only a test change. Clean backport. Test using these files pass. SAP nightly testing passed.
29-03-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2634 Date: 2024-03-28 13:20:19 +0000
28-03-2024

Fix request [17u] I backport this for parity with 17.0.12-oracle. No risk, only a test change. Clean backport. Test using these files pass. SAP nightly testing passed.
22-03-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/2315 Date: 2024-03-20 14:00:07 +0000
20-03-2024

Changeset: b5de2cc9 Author: Liam Miller-Cushon <cushon@openjdk.org> Date: 2022-01-26 17:40:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/b5de2cc9d36e1fad7d0bf70f7c83ff829e16b7f3
26-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7209 Date: 2022-01-25 03:39:54 +0000
25-01-2022