RFR: 8241800: Disable IPV6_MULTICAST_ALL to prevent interference from all multicast groups [v9]
Alan Bateman
alanb at openjdk.org
Mon Jun 19 17:11:12 UTC 2023
On Mon, 19 Jun 2023 16:48:28 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 one additional commit since the last revision:
>
> added explicit platform checks
Marked as reviewed by alanb (Reviewer).
test/jdk/java/nio/channels/DatagramChannel/Promiscuous.java line 196:
> 194: }
> 195:
> 196: private static boolean supportedByPlatform() {
Do you mind adding a /**/ comment to this method to say that it returns true if platform allows an IPv6 socket join an IPv4 multicast group?
test/jdk/java/nio/channels/DatagramChannel/PromiscuousIPv6.java line 204:
> 202: }
> 203:
> 204: private static boolean supportedByPlatform() {
This method too, I think it needs a comment to this method to say that it returns true if platform allows an IPv6 socket join an IPv4 multicast group without interference.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14491#pullrequestreview-1486592930
PR Review Comment: https://git.openjdk.org/jdk/pull/14491#discussion_r1234290608
PR Review Comment: https://git.openjdk.org/jdk/pull/14491#discussion_r1234291006
More information about the nio-dev
mailing list