Subject: kern/11037: aue drops IPv6 router advertisement
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hehe@mx1.freemail.ne.jp>
List: netbsd-bugs
Date: 09/18/2000 08:59:22
>Number: 11037
>Category: kern
>Synopsis: aue USB ether driver drops IPv6 router advertisement
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 18 09:05:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Ryoji Kato
>Release: 1.5_ALPHA2 (20000918)
>Organization:
Nippon Ericsson K.K.
>Environment:
SONY VAIO
machine: SONY VAIO PCG-C1
os: NetBSD 1.5_ALPHA2
target: MELCO USB 10/100M Ethernet LUA-TX
System: NetBSD vaio.foo.bar 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (VAIO-PCGC1) #0: Mon Sep 18 22:11:08 GMT 2000 nrjryka@vaio.foo.bar:/export/work/aue/arch/i386/compile/VAIO-PCGC1 i386
>Description:
LUA-TX (USB 10/100M Ethernet adapter, MELCO co.) drops IPv6 packets
of router advertisement. Though the tcpdump on the router told that
the router send RS to ff02::1 after receiving RA from LUA-TX, the
interface of LUA-TX seems to ignore RA.
My guess is that aue driver doesn't correctly configure the ether
multicast addresses.
>How-To-Repeat:
Assuming two hosts, IPv6 router and IPv6 node, which are connected
with ethernet, rtadvd runs on the IPv6 router to advertise the
network prefix, and the IPv6 node has LUA-TX.
Run the following commands on the IPv6 node.
# ifconfig aue0 inet6 up
# sysctl -w net.inet6.ip6.accept_rtadv=1
# rtsol aue0
But the last "rtsol" add no IPv6 address to aue0.
>Fix:
The following patch for sys/dev/usb/if_aue.c will solve this problem.
--- if_aue.c.orig Mon Sep 18 21:36:28 2000
+++ if_aue.c Mon Sep 18 23:44:56 2000
@@ -631,7 +631,7 @@
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
h = aue_crc(LLADDR((struct sockaddr_dl *)ifma->ifma_addr));
- AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0xF));
+ AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0x7));
}
#elif defined(__NetBSD__) || defined(__OpenBSD__)
#if defined(__NetBSD__)
@@ -649,7 +649,7 @@
}
#endif
h = aue_crc(enm->enm_addrlo);
- AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0xF));
+ AUE_SETBIT(sc, AUE_MAR + (h >> 3), 1 << (h & 0x7));
ETHER_NEXT_MULTI(step, enm);
}
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
@@ -1719,6 +1719,14 @@
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->aue_ec) :
+ ether_delmulti(ifr, &sc->aue_ec);
+ if (error == ENETRESET) {
+ aue_init(sc);
+ }
+#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
aue_setmulti(sc);
error = 0;
break;
>Release-Note:
>Audit-Trail:
>Unformatted: