On Tue, 18 Aug 2026 10:14:54 GMT, Alan Bateman <[email protected]> wrote:
>> David Briemann has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> address review comments
>
> src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java line 1506:
>
>> 1504: if (family == StandardProtocolFamily.INET6
>> 1505: && !Net.canIPv6SocketJoinIPv4Group()
>> 1506: && !Net.canJoin6WithIPv4Group())
>
> Did you mean to update this? This impacts all platforms and doesn't look like
> it is needed.
Indeed this is not needed anymore.
> src/java.base/unix/native/libnio/ch/Net.c line 787:
>
>> 785: // AIX rejects MCAST_*_SOURCE_GROUP for IPv4-mapped groups with
>> EINVAL
>> 786: if (source != NULL && errno == EINVAL &&
>> isIPv4MappedAddress(env, group))
>> 787: return IOS_UNAVAILABLE;
>
> group_source_req req is populated by initGroupSourceReq so you should be able
> to use IN6_IS_ADDR_V4MAPPED to test for an IPv4-mapped IPv6 address, e.g.
>
> struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&req->gsr_source;
> if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
> ..
> }
Yes, that is better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32317#discussion_r3803852606
PR Review Comment: https://git.openjdk.org/jdk/pull/32317#discussion_r3803870613