On 9/7/18 1:15 PM, Alan Bateman wrote: > On 07/09/2018 10:49, Decke, Hendrik (K-GERFA/A) wrote: >> >> Hello, >> >> it seems one of our external developers (Andre Naujoks, CC) found a >> bug while binding a IPv6 multicast UDP-socket for one of our projects. >> >> >> >> Since this seems to be a fundamental bug (from our perspective), we >> address this directly to this mailing list. >> >> (reproducible in OpenJDK 8-11, Windows and Linux) >> > This bug was submitted this week on this issue: > https://bugs.openjdk.java.net/browse/JDK-8210493 > > Have you tried joining the mullticast group, specifying the network > interface, rather than binding to the multicast address?
Hi Alan. First of all, thank you for the quick reply. I was not aware, that there was actually a bug opened for that issue. The join is not the problem at this point. We need to bind the socket to the address to avoid receiving traffic from all multicast groups, that are joined on the system. Since a join joins the system (not the socket) to the group, all sockets bound to a port, which receive multicast traffic will receive all of that traffic, no matter the destination address. The bind prevents that. IP_MULTICAST_ALL sadly only works for IPv4 and the patch I tried to get IPV6_MULTICAST_ALL upstream into the kernel was even more sadly (almost) ignored. see https://marc.info/?l=linux-netdev&m=152344460530252&w=2 Andre > > -Alan