Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jul 2015 08:31:52 +0200
From:      Kristof Provost <kp@FreeBSD.org>
To:        koobs@FreeBSD.org
Cc:        freebsd-net@FreeBSD.org, ae@FreeBSD.org
Subject:   Re: radvd issue on CURRENT
Message-ID:  <4BA4AF18-6CC7-48A9-8035-22B3E209257A@FreeBSD.org>
In-Reply-To: <5596192F.2050802@FreeBSD.org>
References:  <7B00338E-6264-44FD-9A55-8E29C01467E7@FreeBSD.org> <5596192F.2050802@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 03 Jul 2015, at 07:10, Kubilay Kocak <koobs@FreeBSD.org> 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=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA4AF18-6CC7-48A9-8035-22B3E209257A>