diff options
author | Camiel Dobbelaar <camield@cvs.openbsd.org> | 2012-10-05 17:17:05 +0000 |
---|---|---|
committer | Camiel Dobbelaar <camield@cvs.openbsd.org> | 2012-10-05 17:17:05 +0000 |
commit | 97f361f45ba615c51d5ed3d199661695056d69fd (patch) | |
tree | d587043476b3011e4b9d407ae8f76b924f697564 /sys/dev | |
parent | f9456dc1995e86224b952c3e98063ed528245036 (diff) |
Point an interface directly to its bridgeport configuration, instead
of to the bridge itself. This is ok, since an interface can only be part
of one bridge, and the parent bridge is easy to find from the bridgeport.
This way we can get rid of a lot of list walks, improving performance
and shortening the code.
ok henning stsp sthen reyk
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/isa/if_ie.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index 34609848d1c..20d63da2aa7 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.35 2008/11/28 02:44:17 brad Exp $ */ +/* $OpenBSD: if_ie.c,v 1.36 2012/10/05 17:17:04 camield Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -1054,16 +1054,16 @@ check_eh(sc, eh, to_bpf) */ #if NBPFILTER > 0 *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0) || - (sc->sc_arpcom.ac_if.if_bridge != NULL); + (sc->sc_arpcom.ac_if.if_bridgeport != NULL); #else - *to_bpf = (sc->sc_arpcom.ac_if.if_bridge != NULL); + *to_bpf = (sc->sc_arpcom.ac_if.if_bridgeport != 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 && sc->sc_arpcom.ac_if.if_bridge == NULL) + if (*to_bpf && sc->sc_arpcom.ac_if.if_bridgeport == NULL) *to_bpf = 2; /* we don't need to see it */ #endif @@ -1095,9 +1095,9 @@ check_eh(sc, eh, to_bpf) */ #if NBPFILTER > 0 *to_bpf = (sc->sc_arpcom.ac_if.if_bpf != 0) || - (sc->sc_arpcom.ac_if.if_bridge != NULL); + (sc->sc_arpcom.ac_if.if_bridgeport != NULL); #else - *to_bpf = (sc->sc_arpcom.ac_if.if_bridge != NULL); + *to_bpf = (sc->sc_arpcom.ac_if.if_bridgeport != NULL); #endif /* We want to see multicasts. */ if (eh->ether_dhost[0] & 1) @@ -1109,7 +1109,7 @@ check_eh(sc, eh, to_bpf) /* Anything else goes to BPF but nothing else. */ #if NBPFILTER > 0 - if (*to_bpf && sc->sc_arpcom.ac_if.if_bridge == NULL) + if (*to_bpf && sc->sc_arpcom.ac_if.if_bridgeport == NULL) *to_bpf = 2; #endif return 1; |