RFR: JDK-8313804: JDWP support for -Djava.net.preferIPv6Addresses=system [v3]

David Holmes dholmes at openjdk.org
Tue Sep 19 05:33:42 UTC 2023


On Tue, 19 Sep 2023 00:03:27 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

>> Please consider this fix for [JDK-8313804](https://bugs.openjdk.org/browse/JDK-8313804), which adds support to JDWP for `-Djava.net.preferIPv6Addresses=system`. Previously it only handled `-Djava.net.preferIPv6Addresses=true` and `-Djava.net.preferIPv6Addresses=false`.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review feedback

Okay I see now that `ai` is not important. We won't have set `listenAddr` so we will take the first `addrInfo`. But this seems somewhat random behaviour as the first `addrInfo` could be either V4 or V6 (what controls the order?). But we then execute the if at L748 regardless because the preferred value is not AF_INET even though the chosen address may still be a v4 address. This may all "just work" but I find it hard to discern what the correct/expected behaviour is if using `system` (which seems to mean "don't care").

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15796#issuecomment-1724854549


More information about the serviceability-dev mailing list