On Tue, 6 Jun 2023 07:25:57 GMT, Alan Bateman <[email protected]> wrote:
>> I've moved the JBS issue to the right place and fix the description. >> >> The changes proposed here impact all platforms and will require discussion >> and cleanup. If I understand the intent, if you create a DatagramSocket or >> MulticastSocket that is bound to a specific local address then you want to >> use that to determine if the underlying socket is IPv4 or IPv6. That might >> be okay but multicasting normally means binding to the wildcard address so >> it doesn't help - I assume it only works for the test because new >> InetSocketAddress(port).getAddress() returns an Inet4Address so you get an >> IPv4 socket. It should only create a dual IPv4/IPv6 socket for this case so >> this is why it will break other platforms. In any case, can you look at the >> isXXX methods defined by sun.nio.ch.Net to see how it is handled on other >> platforms. > >> Yes, I agree with @AlanBateman and @msheppar . Even when we try to have an >> IPv4 multicast socket join an IPv4 multicast group, we still fail because >> the delegate that is created for an IPv4 multicast socket is IPv4/IPv6 (dual >> stack) in nature. AIX does not allow dual stack (IPv4/IPv6) sockets to join >> IPv4 multicast groups. > > The "Platform dependencies" section in the java.nio.channels.MulticastChannel > (implemented by DatagramChannel) makes it clear that it is implementation > specific as to whether a channel to an IPv6 socket can join an IPv4 multicast > group. The recommendation is to specify the protocol family when creating the > channel. Legacy DatagramSocket/MulticastSocket do not define a constructor > that allows the protocol family be specified at xxxSocket create time. That > issue has been there since JDK 1.4 when IPv6 support was added. I'm curious > why this might be coming up with AIX now. Here, We are looking at all of the test failures mentioned in the JBS issue right now and trying to fix them . So, @AlanBateman Do you have any suggestion to fix these tests? I would be happy to look into that. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14142#issuecomment-1584958570
