Date: Wed, 3 May 1995 09:00:45 PDT From: Bill Fenner <fenner@parc.xerox.com> To: freebsd-current@FreeBSD.org Cc: fenner@parc.xerox.com Subject: if_de: BPF problems, auto interface switching? Message-ID: <95May3.090055pdt.49859@crevenia.parc.xerox.com>
next in thread | raw e-mail | index | archive | help
I have experienced two problems with if_de.c:
1) The BPFILTER logic is a little warped; the existing code only lets
multicasts through if you have a bpf listener. Here is a patch.
*** if_de.c.orig Wed May 3 08:36:36 1995
--- if_de.c Wed May 3 08:37:47 1995
***************
*** 567,577 ****
#if NBPFILTER > 0
if (sc->tulip_bpf != NULL) {
bpf_tap(sc->tulip_bpf, mtod(m, caddr_t), total_len);
! if ((eh.ether_dhost[0] & 1) == 0 &&
!TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_ac.ac_enaddr))
- goto next;
- } else if (!TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_ac.ac_enaddr)
- && !TULIP_ADDRBRDCST(eh.ether_dhost)) {
goto next;
}
#endif
--- 567,575 ----
#if NBPFILTER > 0
if (sc->tulip_bpf != NULL) {
bpf_tap(sc->tulip_bpf, mtod(m, caddr_t), total_len);
! if (sc->tulip_if.if_flags & IFF_PROMISC &&
! (eh.ether_dhost[0] & 1) == 0 &&
!TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_ac.ac_enaddr))
goto next;
}
#endif
2) I sometimes get
May 3 08:42:35 fenestro /kernel: de0: enabling 10baseT/UTP port
I can't relate this happening to any real-world action (besides, of course,
me losing my network connectivity, but there's some cause-effect relationship
there =). If I "ifconfig de0 link2" it comes back, and says
May 3 08:44:30 fenestro /kernel: de0: enabling Thinwire/AUI port
I assume that if I ifconfig link2 at startup, it will stop trying to do
autoswitching (I have yet to confirm this, of course =), but it might
be good to know that autoswitching may not work perfectly.
(My card is a Linksys "EtherPCI LAN card".)
Bill
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95May3.090055pdt.49859>
