RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v6]
Daniel Fuchs
dfuchs at openjdk.java.net
Thu Jan 27 10:32:33 UTC 2022
On Wed, 26 Jan 2022 20:09:36 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> src/java.base/windows/native/libnet/NetworkInterface_winXP.c line 253:
>>
>>> 251:
>>> 252: ret = enumInterfaces(env, netifPP);
>>> 253: if (ret < 0) {
>>
>> Why did we remove handling for -2 here when `enumInterfaces` might return -2 if it does not find any IPv4 network interface? Shouldn't we keep the code that reset the exception status and set *netifPP = null here if ret == -2?
>
> `enumInterfaces` no longer returns -2. It does not fail on IPv6 machines, and if it failed, our code wouldn't recover anyway. After a discussion with @msheppar I decided to remove -2 from the list of possible return values.
Oh - I see I missed that in the diff. That's the change at line 216.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6090
More information about the net-dev
mailing list