From owner-freebsd-net@freebsd.org Fri Jul 3 06:31:20 2015 Return-Path: Delivered-To: freebsd-net@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 BAB6C9927C9 for ; Fri, 3 Jul 2015 06:31:20 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8573B2CB1; Fri, 3 Jul 2015 06:31:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [IPv6:2a02:1811:2419:4e02:3d64:dd41:15e2:5934] (unknown [IPv6:2a02:1811:2419:4e02:3d64:dd41:15e2:5934]) by venus.codepro.be (Postfix) with ESMTPSA id 8C4C69A86; Fri, 3 Jul 2015 08:31:16 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: radvd issue on CURRENT From: Kristof Provost In-Reply-To: <5596192F.2050802@FreeBSD.org> Date: Fri, 3 Jul 2015 08:31:52 +0200 Cc: freebsd-net@FreeBSD.org, ae@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: <4BA4AF18-6CC7-48A9-8035-22B3E209257A@FreeBSD.org> References: <7B00338E-6264-44FD-9A55-8E29C01467E7@FreeBSD.org> <5596192F.2050802@FreeBSD.org> To: koobs@FreeBSD.org X-Mailer: Apple Mail (2.2102) X-Mailman-Approved-At: Fri, 03 Jul 2015 11:33:15 +0000 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 06:31:20 -0000 > On 03 Jul 2015, at 07:10, Kubilay Kocak wrote: >=20 > On 3/07/2015 6:12 AM, Kristof Provost wrote: >> Hi, >>=20 >> In the process of setting up my TPLink device (Thanks Allan!) I ran >> into problems getting radvd to work. >>=20 >=20 > Just for clarity, what TP-Link device? It=E2=80=99s a TL-WDR3600. > pciconf -lvc output would be handy (for me, possibly others and = google) # pciconf -lvc ath1@pci0:0:0:0: class=3D0x028000 card=3D0xa120168c = chip=3D0x0033168c rev=3D0x01 hdr=3D0x00 class =3D network cap 01[40] =3D powerspec 3 supports D0 D1 D3 current D0 cap 05[50] =3D MSI supports 4 messages, 64 bit, vector masks cap 10[70] =3D PCI-Express 2 endpoint max data 128(128) link x1(x1) speed 2.5(2.5) ASPM disabled(L0s/L1) ecap 0001[100] =3D AER 1 0 fatal 0 non-fatal 0 corrected ecap 0002[140] =3D VC 1 max VC0 ecap 0003[300] =3D Serial 1 0000000000000000 It=E2=80=99s not a hardware issue though, it=E2=80=99s a bug in the ip6 = stack. This fixes it for me, but I=E2=80=99m not sure it=E2=80=99s the best = approach. I=E2=80=99ll look at it some more over the weekend to see if I can come = up with something better: diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index d667903..bcca2fa 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -2565,10 +2565,30 @@ ip6_setpktopt(int optname, u_char *buf, int len, = struct ip6_pktopts *opt, if (ifp !=3D NULL && !IN6_IS_ADDR_UNSPECIFIED(&pktinfo->ipi6_addr)) { struct in6_ifaddr *ia; - - ia =3D in6ifa_ifpwithaddr(ifp, = &pktinfo->ipi6_addr); - if (ia =3D=3D NULL) + struct in6_addr in6; + + bcopy(&pktinfo->ipi6_addr, &in6, sizeof(in6)); + in6_setscope(&in6, ifp, NULL); + + ia =3D in6ifa_ifpwithaddr(ifp, &in6); + if (ia =3D=3D NULL) { =E2=80=94=20 Kristof=