diff options
author | paul <paul@FreeBSD.org> | 2000-05-14 17:37:34 +0000 |
---|---|---|
committer | paul <paul@FreeBSD.org> | 2000-05-14 17:37:34 +0000 |
commit | 72f1169b67e91a90904a5ef5a3208fbe180d137a (patch) | |
tree | a25f441d29cde0e47777ab438d939d479eebd317 | |
parent | 81798fe43a9509c84b21e8b4ba479816659a7171 (diff) | |
download | FreeBSD-src-72f1169b67e91a90904a5ef5a3208fbe180d137a.zip FreeBSD-src-72f1169b67e91a90904a5ef5a3208fbe180d137a.tar.gz |
Sync with the BPF and BRIDGE changes.
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 57 |
1 files changed, 5 insertions, 52 deletions
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 <net/bpf.h> -#include "opt_bdg.h" -#ifdef BRIDGE -#include <net/bridge.h> -#endif - #ifdef PC98 #include <machine/clock.h> #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; |