Subject: hme multicast problem
To: None <port-sparc64@netbsd.org>
From: FUKAUMI Naoki <naoki@fukaumi.org>
List: port-sparc64
Date: 11/16/2001 10:29:32
My machine is U10 which has hme on pci bus.
# ifconfig hme0
hme0: flags=8a63<UP,BROADCAST,NOTRAILERS,RUNNING,ALLMULTI,SIMPLEX,MULTICAST> mtu 1500
address: 08:00:20:a7:8e:d2
media: Ethernet autoselect (10baseT)
status: active
(snip)
I found a problem...
If I set hme media
autoselect (and link up 10baseT)
or
10baseT manually
, hme did NOT behave SIMPLEX...
# ping6 -I hme0 ff02::1
PING6(64=40+8+16 bytes) fe80::a00:20ff:fea7:8ed2%hme0 --> ff02::1
24 bytes from fe80::a00:20ff:fea7:8ed2%hme0, icmp_seq=0 hlim=64 time=0 ms
24 bytes from fe80::a00:20ff:fea7:8ed2%hme0, icmp_seq=0 hlim=64 time=0 ms(DUP!)
24 bytes from fe80::a00:20ff:fea7:8ed2%hme0, icmp_seq=1 hlim=64 time=0 ms
24 bytes from fe80::a00:20ff:fea7:8ed2%hme0, icmp_seq=1 hlim=64 time=0 ms(DUP!)
--- ff02::1 ping6 statistics ---
2 packets transmitted, 2 packets received, +2 duplicates, 0% packet loss
round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms
no problem in other media. uum...
Your hme works correctly ? on pci ? on sbus ???
I attach ad-hoc patch this mail...
# sorry, this is edited manually, so offset may be different
--
FUKAUMI Naoki
--- sys/dev/ic/hme.c.orig Mon Nov 12 14:07:29 2001
+++ sys/dev/ic/hme.c Mon Nov 12 14:39:23 2001
@@ -759,6 +742,7 @@
int ix, len;
{
struct ifnet *ifp = &sc->sc_ethercom.ec_if;
+ struct ether_header *eh;
struct mbuf *m;
if (len <= sizeof(struct ether_header) ||
@@ -780,6 +764,13 @@
return;
}
+ eh = mtod(m, struct ether_header *);
+ if (memcmp(LLADDR(ifp->if_sadl), eh->ether_shost,
+ ETHER_ADDR_LEN) == 0) {
+ m_freem(m);
+ return;
+ }
+
ifp->if_ipackets++;
#if NBPFILTER > 0