On Tue, 19 Sep 2023 00:03:27 GMT, Liam Miller-Cushon <cus...@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

The order of the `addInfo`s is determined by `getaddrinfo()`, which is supposed 
to sort the results according to [RFC 
6724](https://datatracker.ietf.org/doc/html/rfc6724). `system` is supposed to 
[preserve that 
order](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/net/doc-files/net-properties.html)
 instead of re-ordering them.

There's some related discussion in  
[JDK-8170568](https://bugs.openjdk.org/browse/JDK-8170568) about use-cases that 
IPv4-first and IPv6-first don't support. The bug details some edge cases that 
still aren't well supported, but in the cases I've seen 
`-Djava.net.preferIPv6Addresses=system` is usually fine, aside from this issue 
with JDWP ignoring that setting.

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

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

Reply via email to