Date: Wed, 03 Sep 2014 16:19:36 +0400 From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: bugzilla-noreply@freebsd.org, freebsd-net@FreeBSD.org Subject: Re: [Bug 193246] Bug in IPv6 multicast join(), uncovered by Jenkins Message-ID: <54070758.2050405@FreeBSD.org> In-Reply-To: <bug-193246-2472-qfPNXiTWms@https.bugs.freebsd.org/bugzilla/> References: <bug-193246-2472@https.bugs.freebsd.org/bugzilla/> <bug-193246-2472-qfPNXiTWms@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03.09.2014 14:05, bugzilla-noreply@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54070758.2050405>