summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>1999-03-03 22:10:33 +0000
committerJason Wright <jason@cvs.openbsd.org>1999-03-03 22:10:33 +0000
commit3e58ddf1845f4df29e479df5a1fd78878b015055 (patch)
tree9a1599e5a09fb8acd848ad77e7adf1a039b6511f /sys/arch
parent31ad1ab56f3b19e7f64d73207d4b4d76047291d4 (diff)
rework check_eh() so that it is bridge aware
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme68k/dev/if_ie.c16
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c16
2 files changed, 22 insertions, 10 deletions
diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c
index a630770fce1..c019c20f2ab 100644
--- a/sys/arch/mvme68k/dev/if_ie.c
+++ b/sys/arch/mvme68k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.8 1999/01/11 05:11:38 millert Exp $ */
+/* $OpenBSD: if_ie.c,v 1.9 1999/03/03 22:10:29 jason Exp $ */
/*-
* Copyright (c) 1995 Theo de Raadt
@@ -816,13 +816,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
@@ -853,7 +856,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)
@@ -865,7 +871,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/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index 3871a4bc9a1..d3a5127976e 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $Id: if_ie.c,v 1.3 1999/01/11 05:11:42 millert Exp $ */
+/* $Id: if_ie.c,v 1.4 1999/03/03 22:10:32 jason Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -829,13 +829,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
@@ -866,7 +869,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)
@@ -878,7 +884,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;