On Wed, 12 Aug 2026 11:36:47 GMT, David Briemann <[email protected]> wrote:

> This fixes the AIX-specific IPv4 multicast join path for dual-stack IPv6 
> datagram sockets.
> 
> Manual testing has succeeded for:
>   - test/jdk/java/net/MulticastSocket/JoinIPv4GroupOnIPv6Socket.java: passed
>   - test/jdk/java/net/MulticastSocket: passed, 18 passed / 0 failed / 0 errors
>   - test/jdk/java/nio/channels/DatagramChannel/BasicMulticastTests.java: 
> passed
>   - 
> test/jdk/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java: 
> passed
>   - test/jdk/java/nio/channels/DatagramChannel/Promiscuous.java: passed
> 
> Also the daily test suite has succeeded for tiers 1-4. All relevant tests 
> have passed.
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

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.

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)) {
  ..
}

test/jdk/java/net/MulticastSocket/JoinIPv4GroupOnIPv6Socket.java line 50:

> 48:  * @run main/othervm JoinIPv4GroupOnIPv6Socket
> 49:  */
> 50: public class JoinIPv4GroupOnIPv6Socket {

All the other tests for MulticastSocket are using a dual socket when IPv6 is 
enabled. What does this test do that is not already tested by the existing 
tests?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32317#discussion_r3803120546
PR Review Comment: https://git.openjdk.org/jdk/pull/32317#discussion_r3803375074
PR Review Comment: https://git.openjdk.org/jdk/pull/32317#discussion_r3803130771

Reply via email to