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:
>
> On 3/07/2015 6:12 AM, Kristof Provost wrote:
>> Hi,
>>
>> In the process of setting up my TPLink device (Thanks Allan!) I ran
>> into problems getting radvd to work.
>>
>
> Just for clarity, what TP-Link device?
It’s a TL-WDR3600.
> pciconf -lvc output would be handy (for me, possibly others and google)
# pciconf -lvc
ath1@pci0:0:0:0: class=0x028000 card=0xa120168c chip=0x0033168c rev=0x01 hdr=0x00
class = network
cap 01[40] = powerspec 3 supports D0 D1 D3 current D0
cap 05[50] = MSI supports 4 messages, 64 bit, vector masks
cap 10[70] = PCI-Express 2 endpoint max data 128(128) link x1(x1)
speed 2.5(2.5) ASPM disabled(L0s/L1)
ecap 0001[100] = AER 1 0 fatal 0 non-fatal 0 corrected
ecap 0002[140] = VC 1 max VC0
ecap 0003[300] = Serial 1 0000000000000000
It’s not a hardware issue though, it’s a bug in the ip6 stack.
This fixes it for me, but I’m not sure it’s the best approach.
I’ll 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 != NULL &&
!IN6_IS_ADDR_UNSPECIFIED(&pktinfo->ipi6_addr)) {
struct in6_ifaddr *ia;
-
- ia = in6ifa_ifpwithaddr(ifp, &pktinfo->ipi6_addr);
- if (ia == NULL)
+ struct in6_addr in6;
+
+ bcopy(&pktinfo->ipi6_addr, &in6, sizeof(in6));
+ in6_setscope(&in6, ifp, NULL);
+
+ ia = in6ifa_ifpwithaddr(ifp, &in6);
+ if (ia == NULL) {
—
Kristof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BA4AF18-6CC7-48A9-8035-22B3E209257A>
