[Bug 193246] Bug in IPv6 multicast join(), uncovered by Jenkins
Andrey V. Elsukov
ae at FreeBSD.org
Wed Sep 3 12:20:33 UTC 2014
On 03.09.2014 14:05, bugzilla-noreply at freebsd.org wrote:
> In FreeBSD, in src/sys/netinet6/in6_mcast.c inside in6p_join_group(), there
> is this:
>
> if (!IN6_IS_ADDR_MULTICAST(&gsa->sin6.sin6_addr))
> return (EINVAL);
>
> Since IN6_IS_ADDR_MULTICAST() only checks if the first octet is 0xff, that is
> what is returning the EINVAL. So the JDK is creating
> an IPV4 multicast address mapped inside an IPV6 address. The FreeBSD
> kernel code is rejecting this as a valid IPV6 multicast address.
>
> I'm not sure if it is better to fix this in the kernel or the JDK.
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;
--
WBR, Andrey V. Elsukov
More information about the freebsd-net
mailing list