diff options
author | Jason Wright <jason@cvs.openbsd.org> | 1999-03-01 20:45:11 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 1999-03-01 20:45:11 +0000 |
commit | 0d42240cec1790f164df0e96aad941eba6156536 (patch) | |
tree | a7b8221182b9bcc7eb1ac2bef4d3ecebe02d3e73 | |
parent | ae38941d9fb3badfdbb2fd2ec7b689cb0462e959 (diff) |
add checks for if_bridge (in addition to if_bpf)
-rw-r--r-- | sys/arch/sparc/dev/if_ie.c | 16 | ||||
-rw-r--r-- | sys/dev/isa/if_ie.c | 16 |
2 files changed, 22 insertions, 10 deletions
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index 64fb8b566e0..9fdaaa1b8d4 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.8 1999/01/11 05:11:55 millert Exp $ */ +/* $OpenBSD: if_ie.c,v 1.9 1999/03/01 20:45:10 jason Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -940,13 +940,16 @@ check_eh(sc, eh, to_bpf) * Receiving all packets. These need to be passed on to BPF. */ #if NBPFILTER > 0 - *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0); + *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0) || + (sc->sc_arpcom.ac_if.if_bridge != NULL); +#else + *to_bpf = (sc->sc_arpcom.ac_if.if_bridge != NULL); #endif /* If for us, accept and hand up to BPF */ if (ether_equal(eh->ether_dhost, sc->sc_arpcom.ac_enaddr)) return 1; #if NBPFILTER > 0 - if (*to_bpf) + if (*to_bpf && sc->sc_arpcom.ac_if.if_bridge == NULL) *to_bpf = 2; /* we don't need to see it */ #endif @@ -977,7 +980,10 @@ check_eh(sc, eh, to_bpf) * time. Whew! (Hope this is a fast machine...) */ #if NBPFILTER > 0 - *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0); + *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0) || + (sc->sc_arpcom.ac_if.if_bridge != NULL); +#else + *to_bpf = (sc->sc_arpcom.ac_if.if_bridge != 0); #endif /* We want to see multicasts. */ if (eh->ether_dhost[0] & 1) @@ -989,7 +995,7 @@ check_eh(sc, eh, to_bpf) /* Anything else goes to BPF but nothing else. */ #if NBPFILTER > 0 - if (*to_bpf) + if (*to_bpf && sc->sc_arpcom.ac_if.if_bridge == NULL) *to_bpf = 2; #endif return 1; diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index e04ee3c31f3..b4d8d5e68cb 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.16 1996/11/29 22:55:00 niklas Exp $ */ +/* $OpenBSD: if_ie.c,v 1.17 1999/03/01 20:45:08 jason Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -1065,14 +1065,17 @@ check_eh(sc, eh, to_bpf) * Receiving all packets. These need to be passed on to BPF. */ #if NBPFILTER > 0 - *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0); + *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0) || + (sc->sc_arpcom.ac_if.if_bridge != NULL); +#else + *to_bpf = (sc->sc_arpcom.ac_if.if_bridge != NULL); #endif /* If for us, accept and hand up to BPF */ if (ether_equal(eh->ether_dhost, sc->sc_arpcom.ac_enaddr)) return 1; #if NBPFILTER > 0 - if (*to_bpf) + if (*to_bpf && sc->sc_arpcom.ac_if.if_bridge == NULL) *to_bpf = 2; /* we don't need to see it */ #endif @@ -1103,7 +1106,10 @@ check_eh(sc, eh, to_bpf) * time. Whew! (Hope this is a fast machine...) */ #if NBPFILTER > 0 - *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0); + *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0) || + (sc->sc_arpcom.ac_if.if_bridge != NULL); +#else + *to_bpf = (sc->sc_arpcom.ac_if.if_bridge != NULL); #endif /* We want to see multicasts. */ if (eh->ether_dhost[0] & 1) @@ -1115,7 +1121,7 @@ check_eh(sc, eh, to_bpf) /* Anything else goes to BPF but nothing else. */ #if NBPFILTER > 0 - if (*to_bpf) + if (*to_bpf && sc->sc_arpcom.ac_if.if_bridge == NULL) *to_bpf = 2; #endif return 1; |