From owner-freebsd-current Wed May 3 09:01:47 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id JAA02686 for current-outgoing; Wed, 3 May 1995 09:01:47 -0700 Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id JAA02680 for ; Wed, 3 May 1995 09:01:46 -0700 Received: from crevenia.parc.xerox.com ([13.2.116.11]) by alpha.xerox.com with SMTP id <14462(5)>; Wed, 3 May 1995 09:01:06 PDT Received: by crevenia.parc.xerox.com id <49859>; Wed, 3 May 1995 09:00:55 -0700 From: Bill Fenner To: freebsd-current@FreeBSD.org Subject: if_de: BPF problems, auto interface switching? Cc: fenner@parc.xerox.com Message-Id: <95May3.090055pdt.49859@crevenia.parc.xerox.com> Date: Wed, 3 May 1995 09:00:45 PDT Sender: current-owner@FreeBSD.org Precedence: bulk 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