diff options
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/if_ed.c | 18 | ||||
-rw-r--r-- | sys/dev/isa/if_eg.c | 18 | ||||
-rw-r--r-- | sys/dev/isa/if_el.c | 18 | ||||
-rw-r--r-- | sys/dev/isa/if_ex.c | 21 | ||||
-rw-r--r-- | sys/dev/isa/if_fe.c | 18 | ||||
-rw-r--r-- | sys/dev/isa/if_hp.c | 10 | ||||
-rw-r--r-- | sys/dev/isa/if_iy.c | 12 |
7 files changed, 13 insertions, 102 deletions
diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index effdbdaa413..701f4296ee1 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ed.c,v 1.40 1998/08/11 03:28:37 millert Exp $ */ +/* $OpenBSD: if_ed.c,v 1.41 1999/02/28 03:23:37 jason Exp $ */ /* $NetBSD: if_ed.c,v 1.105 1996/10/21 22:40:45 thorpej Exp $ */ /* @@ -2562,22 +2562,8 @@ edread(sc, buf, len) * Check if there's a BPF listener on this interface. * If so, hand off the raw packet to BPF. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - - /* - * Note that the interface cannot be in promiscuous mode if - * there are no BPF listeners. And if we are in promiscuous - * mode, we have to check if this packet is really ours. - */ - if ((ifp->if_flags & IFF_PROMISC) && - (eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */ - bcmp(eh->ether_dhost, sc->sc_arpcom.ac_enaddr, - sizeof(eh->ether_dhost)) != 0) { - m_freem(m); - return; - } - } #endif /* We assume that the header fit entirely in one mbuf. */ diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index dd28594204d..058b81cda31 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_eg.c,v 1.13 1997/11/07 08:06:47 niklas Exp $ */ +/* $OpenBSD: if_eg.c,v 1.14 1999/02/28 03:23:37 jason Exp $ */ /* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */ /* @@ -665,22 +665,8 @@ egread(sc, buf, len) * Check if there's a BPF listener on this interface. * If so, hand off the raw packet to BPF. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - - /* - * Note that the interface cannot be in promiscuous mode if - * there are no BPF listeners. And if we are in promiscuous - * mode, we have to check if this packet is really ours. - */ - if ((ifp->if_flags & IFF_PROMISC) && - (eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */ - bcmp(eh->ether_dhost, sc->sc_arpcom.ac_enaddr, - sizeof(eh->ether_dhost)) != 0) { - m_freem(m); - return; - } - } #endif /* We assume the header fit entirely in one mbuf. */ diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index 7036ec9dbcb..fa80836748c 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_el.c,v 1.11 1996/05/26 00:27:18 deraadt Exp $ */ +/* $OpenBSD: if_el.c,v 1.12 1999/02/28 03:23:37 jason Exp $ */ /* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */ /* @@ -530,22 +530,8 @@ elread(sc, len) * Check if there's a BPF listener on this interface. * If so, hand off the raw packet to BPF. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - - /* - * Note that the interface cannot be in promiscuous mode if - * there are no BPF listeners. And if we are in promiscuous - * mode, we have to check if this packet is really ours. - */ - if ((ifp->if_flags & IFF_PROMISC) && - (eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */ - bcmp(eh->ether_dhost, sc->sc_arpcom.ac_enaddr, - sizeof(eh->ether_dhost)) != 0) { - m_freem(m); - return; - } - } #endif /* We assume that the header fit entirely in one mbuf. */ diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c index ff1b73fefdc..963b0ac2657 100644 --- a/sys/dev/isa/if_ex.c +++ b/sys/dev/isa/if_ex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ex.c,v 1.3 1999/02/13 01:02:21 fgsch Exp $ */ +/* $OpenBSD: if_ex.c,v 1.4 1999/02/28 03:23:38 jason Exp $ */ /* * Copyright (c) 1997, Donald A. Schmidt * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) @@ -769,25 +769,8 @@ ex_rx_intr(sc) } #endif #if NBPFILTER > 0 - if (ifp->if_bpf != NULL) { + if (ifp->if_bpf != NULL) bpf_mtap(ifp->if_bpf, ipkt); - /* - * Note that the interface cannot be in - * promiscuous mode if there are no BPF - * listeners. And if we are in promiscuous - * mode, we have to check if this packet is - * really ours. - */ - if ((ifp->if_flags & IFF_PROMISC) && - (eh->ether_dhost[0] & 1) == 0 && - bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr, - sizeof(eh->ether_dhost)) != 0 && - bcmp(eh->ether_dhost, etherbroadcastaddr, - sizeof(eh->ether_dhost)) != 0) { - m_freem(ipkt); - goto rx_another; - } - } #endif m_adj(ipkt, sizeof(struct ether_header)); ether_input(ifp, eh, ipkt); diff --git a/sys/dev/isa/if_fe.c b/sys/dev/isa/if_fe.c index 7ed9f0194a5..277607a02f4 100644 --- a/sys/dev/isa/if_fe.c +++ b/sys/dev/isa/if_fe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fe.c,v 1.11 1997/11/07 08:06:53 niklas Exp $ */ +/* $OpenBSD: if_fe.c,v 1.12 1999/02/28 03:23:38 jason Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -2077,22 +2077,8 @@ fe_get_packet(sc, len) * Check if there's a BPF listener on this interface. If so, hand off * the raw packet to bpf. */ - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); - - /* - * Note that the interface cannot be in promiscuous mode if - * there are no BPF listeners. And if we are in promiscuous - * mode, we have to check if this packet is really ours. - */ - if ((ifp->if_flags & IFF_PROMISC) != 0 && - (eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */ - bcmp(eh->ether_dhost, sc->sc_arpcom.ac_enaddr, - sizeof(eh->ether_dhost)) != 0) { - m_freem(m); - return (1); - } - } #endif /* Fix up data start offset in mbuf to point past ether header. */ diff --git a/sys/dev/isa/if_hp.c b/sys/dev/isa/if_hp.c index c4e48e29cf2..f231063509d 100644 --- a/sys/dev/isa/if_hp.c +++ b/sys/dev/isa/if_hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hp.c,v 1.4 1996/05/05 13:38:41 mickey Exp $ */ +/* $OpenBSD: if_hp.c,v 1.5 1999/02/28 03:23:38 jason Exp $ */ /* $NetBSD: if_hp.c,v 1.21 1995/12/24 02:31:31 mycroft Exp $ */ /* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */ @@ -812,14 +812,6 @@ hpread(ns, buf, len) if (ns->ns_bpf) bpf_tap(ns->ns_bpf, buf, len + sizeof(struct ether_header)); #endif - - if ((ns->ns_if.if_flags & IFF_PROMISC) - && bcmp(eh->ether_dhost, ns->ns_addrp, - sizeof(eh->ether_dhost)) != 0 - && bcmp(eh->ether_dhost, etherbroadcastaddr, - sizeof(eh->ether_dhost)) != 0) - return; - /* * Pull packet off interface. Off is nonzero if packet * has trailing header; hpget will then force this header diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index 363ddbefbab..76242a5f4d8 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iy.c,v 1.3 1997/11/07 08:07:00 niklas Exp $ */ +/* $OpenBSD: if_iy.c,v 1.4 1999/02/28 03:23:38 jason Exp $ */ /* $NetBSD: if_iy.c,v 1.4 1996/05/12 23:52:53 mycroft Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -847,16 +847,8 @@ int iobase, rxlen; eh = mtod(top, struct ether_header *); #if NBPFILTER > 0 - if (ifp->if_bpf) { + if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, top); - if ((ifp->if_flags & IFF_PROMISC) && - (eh->ether_dhost[0] & 1) == 0 && - bcmp(eh->ether_dhost, sc->sc_arpcom.ac_enaddr, - sizeof(eh->ether_dhost)) != 0) { - m_freem(top); - return; - } - } #endif m_adj(top, sizeof(struct ether_header)); ether_input(ifp, eh, top); |