From 72f1169b67e91a90904a5ef5a3208fbe180d137a Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 14 May 2000 17:37:34 +0000 Subject: Sync with the BPF and BRIDGE changes. --- sys/dev/lnc/if_lnc.c | 57 +++++----------------------------------------------- 1 file changed, 5 insertions(+), 52 deletions(-) (limited to 'sys/dev/lnc') diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index 42e3c02..308f557 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -84,11 +84,6 @@ #include -#include "opt_bdg.h" -#ifdef BRIDGE -#include -#endif - #ifdef PC98 #include #endif @@ -596,56 +591,14 @@ lnc_rint(struct lnc_softc *sc) */ head->m_pkthdr.rcvif = &sc->arpcom.ac_if; head->m_pkthdr.len = pkt_len ; - - /* - * BPF expects the ether header to be in the first - * mbuf of the chain so point eh at the right place - * but don't increment the mbuf pointers before - * the bpf tap. - */ - eh = (struct ether_header *) head->m_data; - if (sc->arpcom.ac_if.if_bpf) - bpf_mtap(&sc->arpcom.ac_if, head); -#ifdef BRIDGE - if (do_bridge) { - struct ifnet *bdg_ifp ; - - bdg_ifp = bridge_in(head); - if (bdg_ifp == BDG_DROP) - m_freem(head); - else { - if (bdg_ifp != BDG_LOCAL) - bdg_forward(&head, bdg_ifp); - if ( bdg_ifp == BDG_LOCAL || - bdg_ifp == BDG_BCAST || - bdg_ifp == BDG_MCAST ) - goto getit; - else if (head) - m_freem(head); - } - } else -#endif - /* Check this packet is really for us */ - - if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC) && - !(eh->ether_dhost[0] & 1) && /* Broadcast and multicast */ - (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - sizeof(eh->ether_dhost)))) - m_freem(head); - else - { -#ifdef BRIDGE -getit: -#endif - /* Skip over the ether header */ - head->m_data += sizeof *eh; - head->m_len -= sizeof *eh; - head->m_pkthdr.len -= sizeof *eh; + /* Skip over the ether header */ + head->m_data += sizeof *eh; + head->m_len -= sizeof *eh; + head->m_pkthdr.len -= sizeof *eh; - ether_input(&sc->arpcom.ac_if, eh, head); - } + ether_input(&sc->arpcom.ac_if, eh, head); } else { int unit = sc->arpcom.ac_if.if_unit; -- cgit v1.1