On 03.09.2014 17:39, Craig Rodrigues wrote: > On Wed, Sep 3, 2014 at 5:19 AM, Andrey V. Elsukov <[email protected]> wrote: >> On 03.09.2014 14:05, [email protected] wrote: >> >> Hi, >> >> you said that this code works in linux. I looked in the linux kernel >> source, and I think it should return EINVAL too. >> net/ipv6/mcast.c:ipv6_sock_mc_join: >> >> 154 if (!ipv6_addr_is_multicast(addr)) >> 155 return -EINVAL; > > > The code does work in Linux. However, you need to look at the > JDK source, not the Linux kernel source. > > In this file: > http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/solaris/native/java/net/PlainDatagramSocketImpl.c > > in the mcast_join_leave() function, there are two code paths: (1) > Linux, (2) Solaris. > > It looks like on Solaris, they support IPv4-mapped multicast addresses for > IPV6, > and things work when they create an IPv6 socket, and then put an > IPv4-mapped multicast address in it. For Linux, they have specific > code paths in that function which seem to force creating an IPv4 > socket.
Yes, I have illumos-gate's code and I can confirm, that IPv4-mapped IPv6 addresses have special handling in multicast code. -- WBR, Andrey V. Elsukov _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[email protected]"
