RFR: 8275640 (win) java.net.NetworkInterface issues with IPv6-only environments [v4]
Daniel Jelinski
duke at openjdk.java.net
Wed Jan 19 08:18:40 UTC 2022
On Wed, 12 Jan 2022 12:34:35 GMT, Daniel Jelinski <duke at openjdk.java.net> wrote:
>> src/java.base/windows/native/libnet/NetworkInterface.c line 216:
>>
>>> 214: break;
>>> 215: }
>>> 216: return -1;
>>
>> *netifPP = NULL;
>>
>> and a similar NULL out value for all return -1 in this function
>
> Why?
> No users of `enumInterfaces` rely on the value returned in the second parameter when `enumInterfaces` returns a negative result. The same is true for `getAllInterfacesAndAddresses`.
> The second parameter was NULL-initialized in a few places; this initialization was not necessary and I just removed it to avoid confusion.
ahh... I see your point now. I missed a few cases where the returned value was referenced (free'd) even though the function failed. These should be fixed now.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6090
More information about the net-dev
mailing list