On Tue, 16 Dec 2025 13:25:35 GMT, Matthias Baesken <[email protected]> wrote:
>> We have a Linux machine with IPV6 disabled.
>> There the test javax/net/ssl/HttpsURLConnection/SubjectAltNameIP.java fails.
>> Error is
>>
>> java.lang.RuntimeException: Server failed to start.
>> at SubjectAltNameIP.doClientSide(SubjectAltNameIP.java:139)
>> at SubjectAltNameIP.<init>(SubjectAltNameIP.java:189)
>> at SubjectAltNameIP.main(SubjectAltNameIP.java:176)
>> at
>> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>> at java.base/java.lang.reflect.Method.invoke(Method.java:565)
>> at
>> com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
>> at java.base/java.lang.Thread.run(Thread.java:1516)
>> Caused by: java.net.SocketException: Protocol family unavailable
>>
>>
>> After looking into the test, it turned out the IPV6 address `::1` was
>> passed in the notion `[::1] `to the isIPv6LiteralAddress, but this method
>> must get the address without '[' and ']' .
>> Additionally I adjusted the exception a bit so that it directly mentions
>> IPV6 and not just some 'protol family' .
>
> Matthias Baesken has updated the pull request incrementally with one
> additional commit since the last revision:
>
> remove net_util_md.c changes, we'll do this in a separate issue
The change looks OK to me.
It's a bit odd that this
`sun.net.util.IPAddressUtil.isIPv6LiteralAddress("[::1]")` returns false where
as `InetAddress.ofLiteral("[::1]")` returns a valid `InetAddress`. But
`IPAddressUtil` is an internal implementation util, so that's what the
expectation maybe of that implementation. The change to this test looks OK to
me.
-------------
Marked as reviewed by jpai (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28825#pullrequestreview-3583331880