From owner-svn-src-head@freebsd.org Thu Apr 7 19:13:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13166B08269; Thu, 7 Apr 2016 19:13:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D4CC51FCA; Thu, 7 Apr 2016 19:13:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [10.0.2.164] (94-224-12-229.access.telenet.be [94.224.12.229]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 2FCB17D10; Thu, 7 Apr 2016 21:13:55 +0200 (CEST) Subject: Re: svn commit: r296986 - head/sys/netinet6 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 From: Kristof Provost X-Checked-By-Nsa: Probably In-Reply-To: <201603171110.u2HBAiFR075164@repo.freebsd.org> Date: Thu, 7 Apr 2016 21:13:55 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <87DA8A8F-3CD6-46A6-B4ED-BC31ADDADABC@FreeBSD.org> References: <201603171110.u2HBAiFR075164@repo.freebsd.org> To: "Andrey V. Elsukov" X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2016 19:13:58 -0000 > On 17 Mar 2016, at 12:10, Andrey V. Elsukov wrote: >=20 > Author: ae > Date: Thu Mar 17 11:10:44 2016 > New Revision: 296986 > URL: https://svnweb.freebsd.org/changeset/base/296986 >=20 > Log: > Reduce the number of local variables. Remove redundant check that inp > pointer isn't NULL, it is safe, because we are handling IPV6_PKTINFO > socket option in this block of code. Also, use in6ifa_withaddr() = instead > of ifa_withaddr(). ... > in6_selectsrc(uint32_t fibnum, struct so > * the interface must be specified; otherwise, = ifa_ifwithaddr() > * will fail matching the address. > */ > - bzero(&srcsock, sizeof(srcsock)); > - srcsock.sin6_family =3D AF_INET6; > - srcsock.sin6_len =3D sizeof(srcsock); > - srcsock.sin6_addr =3D pi->ipi6_addr; > + tmp =3D pi->ipi6_addr; > if (ifp) { > - error =3D in6_setscope(&srcsock.sin6_addr, ifp, = NULL); > + error =3D in6_setscope(&tmp, ifp, &odstzone); > if (error) > return (error); > } > if (cred !=3D NULL && (error =3D prison_local_ip6(cred, > - &srcsock.sin6_addr, (inp !=3D NULL && > - (inp->inp_flags & IN6P_IPV6_V6ONLY) !=3D 0))) !=3D = 0) > + &tmp, (inp->inp_flags & IN6P_IPV6_V6ONLY) !=3D 0)) = !=3D 0) > return (error); >=20 > /* > @@ -262,19 +255,18 @@ in6_selectsrc(uint32_t fibnum, struct so > * ancillary data. > */ > if ((inp->inp_flags & INP_BINDANY) =3D=3D 0) { > - ia6 =3D (struct in6_ifaddr *)ifa_ifwithaddr( > - (struct sockaddr *)&srcsock); > - if (ia6 =3D=3D NULL || (ia6->ia6_flags & = (IN6_IFF_ANYCAST | > + ia =3D in6ifa_ifwithaddr(&tmp, odstzone); I believe this breaks radvd. It tries to send out RAs with a link-local = source address. These fail with 'ERR#49 'Can't assign requested address=E2=80=99=E2=80=99.= Note that =E2=80=98tmp=E2=80=99 has had the zoneid embedded into it = already (in6_setscope() above), so the address comparison in = in6ifa_ifwithaddr() fails to match. That leads to the EADDRNOTAVAIL error. I don=E2=80=99t think this is the specific commit that broke things (at = least, I don=E2=80=99t see how it worked before), but I=E2=80=99m hoping you=E2=80=99ll have a better idea of what went = wrong. Regards, Kristof=