Subject: if_ed.c driver bug
To: None <>
From: Havard Eidnes <>
List: netbsd-bugs
Date: 12/11/1993 19:40:57

I am currently looking at if_ed.c dated Dec 10 16:11 -0100, and I am
finding that there probably is a loose end which has to do with the
reception of multicasts when you turn on promiscuous mode and have the BPF
code enabled.  The bug is in ed_get_packet(), right after the comment

		 * XXX This test does not support multicasts.

Why not adopt the following fix to this:

		if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC) &&
			bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
				sizeof(eh->ether_dhost)) != 0 &&
			bcmp(eh->ether_dhost, etherbroadcastaddr,
				sizeof(eh->ether_dhost)) != 0 &&
			(eh->ether_dhost[0] & 1) == 0) {


ie. also pass up any packet with the multicast bit set in the ethernet
destination address, and let the higher layers sort out if anyone should
receive the multicasts.  It is true that this will cause higher load when
there is a BPF listener, but that is to be expected.  The bug is that a BPF
listener will effectively turn off reception of ethernet multicasts, which
is probably bad...

After that, you can change the comment :-)

- H}vard