JDK-8313804 : JDWP support for -Djava.net.preferIPv6Addresses=system
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-05
  • Updated: 2023-10-13
  • Resolved: 2023-09-25
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 22
22 b17Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
java.net.preferIPv6Addresses is documented as supporting three values: true, false, and system: https://github.com/openjdk/jdk/blob/6d185296161606edbc9f737a6b1b27496add9367/src/java.base/share/classes/java/net/doc-files/net-properties.html#L55-L63

The JDWP implementation reads preferIPv6Addresses, but it only handles the 'true' and 'false' values: https://github.com/openjdk/jdk/blob/6d185296161606edbc9f737a6b1b27496add9367/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c#L1370-L1371

JDWP should be updated to handle -Djava.net.preferIPv6Addresses=system, and avoid re-ordering the address returned by getaddrinfo in that case.
Comments
Changeset: 9291b46b Author: Liam Miller-Cushon <cushon@openjdk.org> Date: 2023-09-25 16:43:20 +0000 URL: https://git.openjdk.org/jdk/commit/9291b46bcfa76a596578eb50c29b9850e7020dea
25-09-2023

[~amenkov] Understood, thanks. Sorry for not coordinating better on this.
20-09-2023

[~cushon] In the future please assign an issue to yourself before start to work on it. If the issue is assigned to other engineer, elaborate with the assignee if it's ok to take the issue.
20-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15796 Date: 2023-09-18 20:32:28 +0000
18-09-2023