RFR: 8241800: Disable IPV6_MULTICAST_ALL to prevent interference from all multicast groups [v2]

Alan Bateman alanb at openjdk.org
Thu Jun 15 16:15:59 UTC 2023


On Thu, 15 Jun 2023 15:05:19 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> Hi,
>> 
>> Can I get the following change reviewed please? It disables the IPV6_MULTICAST_ALL socket option on UDP sockets on Linux systems which support the option (kernel version 4.20+). This has the effect of disabling the surprising default behavior of multicast sockets on Linux where sockets can receive packets sent to groups the receiver has not joined, if some other socket has joined that group on the same system.
>> 
>> The equivalent behavior has already been implemented for IPv4 sockets.
>> 
>> Thanks,
>> Michael.
>
> Michael McMahon has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - typo
>  - review update

src/java.base/unix/native/libnio/ch/Net.c line 325:

> 323:             close(fd);
> 324:             return -1;
> 325:         }

This implementation change looks okay, assuming ENOPROTOOPT on older kernels. I haven't had time to study the test yet, tricky scenario to test reliably.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14491#discussion_r1231251127


More information about the nio-dev mailing list