diff options
-rw-r--r-- | sys/dev/pci/if_de.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/if_fxp.c | 20 | ||||
-rw-r--r-- | sys/dev/pci/if_mx.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/if_pn.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/if_rl.c | 17 | ||||
-rw-r--r-- | sys/dev/pci/if_tx.c | 13 | ||||
-rw-r--r-- | sys/dev/pci/if_vr.c | 17 | ||||
-rw-r--r-- | sys/dev/pci/if_xl.c | 9 |
8 files changed, 17 insertions, 92 deletions
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index 0658c170beb..8bf38bb1df5 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.39 1999/02/04 22:33:32 deraadt Exp $ */ +/* $OpenBSD: if_de.c,v 1.40 1999/02/26 17:05:51 jason Exp $ */ /* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */ /*- @@ -3477,10 +3477,6 @@ tulip_rx_intr( } #endif sc->tulip_flags |= TULIP_RXACT; - if ((sc->tulip_flags & (TULIP_PROMISC|TULIP_HASHONLY)) - && (eh.ether_dhost[0] & 1) == 0 - && !TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_enaddr)) - goto next; accept = 1; total_len -= sizeof(struct ether_header); } else { @@ -3511,7 +3507,6 @@ tulip_rx_intr( } } } - next: #if defined(TULIP_DEBUG) cnt++; #endif diff --git a/sys/dev/pci/if_fxp.c b/sys/dev/pci/if_fxp.c index 42e471ae40d..150c0f0709c 100644 --- a/sys/dev/pci/if_fxp.c +++ b/sys/dev/pci/if_fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fxp.c,v 1.18 1998/12/30 03:02:47 millert Exp $ */ +/* $OpenBSD: if_fxp.c,v 1.19 1999/02/26 17:05:53 jason Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -1063,26 +1063,10 @@ rcvloop: sizeof(struct ether_header); eh = mtod(m, struct ether_header *); #if NBPFILTER > 0 - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_tap(FXP_BPFTAP_ARG(ifp), mtod(m, caddr_t), total_len); - /* - * Only pass this packet up - * if it is for us. - */ - if ((ifp->if_flags & - IFF_PROMISC) && - (*(u_int16_t *)(rfap + - offsetof(struct fxp_rfa, - rfa_status)) & - FXP_RFA_STATUS_IAMATCH) && - (eh->ether_dhost[0] & 1) - == 0) { - m_freem(m); - goto rcvloop; - } - } #endif /* NBPFILTER > 0 */ m->m_data += sizeof(struct ether_header); diff --git a/sys/dev/pci/if_mx.c b/sys/dev/pci/if_mx.c index 3b2b0213652..282ed33f5c2 100644 --- a/sys/dev/pci/if_mx.c +++ b/sys/dev/pci/if_mx.c @@ -1386,16 +1386,8 @@ static void mx_rxeof(sc) * a broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - if (ifp->if_flags & IFF_PROMISC && - (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - ETHER_ADDR_LEN) && - (eh->ether_dhost[0] & 1) == 0)) { - m_freem(m); - continue; - } - } #endif /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); diff --git a/sys/dev/pci/if_pn.c b/sys/dev/pci/if_pn.c index 5f7b1db3235..e7a957c3108 100644 --- a/sys/dev/pci/if_pn.c +++ b/sys/dev/pci/if_pn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pn.c,v 1.1 1999/01/11 04:28:24 jason Exp $ */ +/* $OpenBSD: if_pn.c,v 1.2 1999/02/26 17:05:54 jason Exp $ */ /* * Copyright (c) 1997, 1998 @@ -132,7 +132,7 @@ #if !defined(lint) && defined(__FreeBSD__) static const char rcsid[] = - "$Id: if_pn.c,v 1.1 1999/01/11 04:28:24 jason Exp $"; + "$Id: if_pn.c,v 1.2 1999/02/26 17:05:54 jason Exp $"; #endif #if defined(__FreeBSD__) @@ -1371,10 +1371,7 @@ static void pn_rxeof(sc) m->m_pkthdr.len = m->m_len = total_len; #if NBPFILTER > 0 /* - * Handle BPF listeners. Let the BPF user see the packet, but - * don't pass it up to the ether_input() layer unless it's - * a broadcast packet, multicast packet, matches our ethernet - * address or the interface is in promiscuous mode. + * Handle BPF listeners. Let the BPF user see the packet. */ if (ifp->if_bpf) { #ifdef __FreeBSD__ @@ -1382,13 +1379,6 @@ static void pn_rxeof(sc) #else bpf_mtap(ifp->if_bpf, m); #endif - if (ifp->if_flags & IFF_PROMISC && - (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - ETHER_ADDR_LEN) && - (eh->ether_dhost[0] & 1) == 0)) { - m_freem(m); - continue; - } } #endif /* Remove header from mbuf and pass it on. */ diff --git a/sys/dev/pci/if_rl.c b/sys/dev/pci/if_rl.c index c777bc5a235..8524248e20f 100644 --- a/sys/dev/pci/if_rl.c +++ b/sys/dev/pci/if_rl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rl.c,v 1.11 1999/02/24 00:20:08 deraadt Exp $ */ +/* $OpenBSD: if_rl.c,v 1.12 1999/02/26 17:05:54 jason Exp $ */ /* * Copyright (c) 1997, 1998 @@ -750,21 +750,10 @@ static void rl_rxeof(sc) #if NBPFILTER > 0 /* - * Handle BPF listeners. Let the BPF user see the packet, but - * don't pass it up to the ether_input() layer unless it's - * a broadcast packet, multicast packet, matches our ethernet - * address or the interface is in promiscuous mode. + * Handle BPF listeners. Let the BPF user see the packet. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - if (ifp->if_flags & IFF_PROMISC && - (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - ETHER_ADDR_LEN) && - (eh->ether_dhost[0] & 1) == 0)) { - m_freem(m); - continue; - } - } #endif /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); diff --git a/sys/dev/pci/if_tx.c b/sys/dev/pci/if_tx.c index 02d77d516f2..0d3d25553e8 100644 --- a/sys/dev/pci/if_tx.c +++ b/sys/dev/pci/if_tx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tx.c,v 1.3 1998/10/10 04:30:09 jason Exp $ */ +/* $OpenBSD: if_tx.c,v 1.4 1999/02/26 17:05:55 jason Exp $ */ /*- * Copyright (c) 1997 Semen Ustimenko (semen@iclub.nsu.ru) @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_tx.c,v 1.3 1998/10/10 04:30:09 jason Exp $ + * $Id: if_tx.c,v 1.4 1999/02/26 17:05:55 jason Exp $ * */ @@ -904,14 +904,7 @@ epic_rx_done __P(( #else /* __OpenBSD__ */ bpf_mtap( sc->sc_if.if_bpf, m ); #endif /* __FreeBSD__ */ - - /* Accept only our packets, broadcasts and multicasts */ - if( (eh->ether_dhost[0] & 1) == 0 && - bcmp(eh->ether_dhost,sc->sc_macaddr,ETHER_ADDR_LEN)){ - m_freem(m); - continue; - } -#endif +#endif /* NBPFILTER > 0 */ /* Second mbuf holds packet ifself */ m->m_pkthdr.len = m->m_len = len - sizeof(struct ether_header); diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 63818e68cb7..2815fbb7f15 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.3 1999/02/24 00:20:09 deraadt Exp $ */ +/* $OpenBSD: if_vr.c,v 1.4 1999/02/26 17:05:55 jason Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1315,21 +1315,10 @@ static void vr_rxeof(sc) m->m_pkthdr.len = m->m_len = total_len; #if NBPFILTER > 0 /* - * Handle BPF listeners. Let the BPF user see the packet, but - * don't pass it up to the ether_input() layer unless it's - * a broadcast packet, multicast packet, matches our ethernet - * address or the interface is in promiscuous mode. + * Handle BPF listeners. Let the BPF user see the packet. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - if (ifp->if_flags & IFF_PROMISC && - (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - ETHER_ADDR_LEN) && - (eh->ether_dhost[0] & 1) == 0)) { - m_freem(m); - continue; - } - } #endif /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); diff --git a/sys/dev/pci/if_xl.c b/sys/dev/pci/if_xl.c index 55d54100b65..42ed9b7034e 100644 --- a/sys/dev/pci/if_xl.c +++ b/sys/dev/pci/if_xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xl.c,v 1.19 1999/02/23 21:06:06 jason Exp $ */ +/* $OpenBSD: if_xl.c,v 1.20 1999/02/26 17:05:55 jason Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1965,13 +1965,6 @@ again: #else bpf_mtap(ifp->if_bpf, m); #endif - if (ifp->if_flags & IFF_PROMISC && - (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - ETHER_ADDR_LEN) && - (eh->ether_dhost[0] & 1) == 0)) { - m_freem(m); - continue; - } } #endif /* Remove header from mbuf and pass it on. */ |