diff options
author | 2006-03-25 22:41:41 +0000 | |
---|---|---|
committer | 2006-03-25 22:41:41 +0000 | |
commit | c4acdf64453f4af90bb07bf72a8beeebce2a3632 (patch) | |
tree | 49370bcebe0760903075593a00be3ed433881b80 /sys/dev/ic/ath.c | |
parent | regen (diff) | |
download | wireguard-openbsd-c4acdf64453f4af90bb07bf72a8beeebce2a3632.tar.xz wireguard-openbsd-c4acdf64453f4af90bb07bf72a8beeebce2a3632.zip |
allow bpf(4) to ignore packets based on their direction (inbound or
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
Diffstat (limited to 'sys/dev/ic/ath.c')
-rw-r--r-- | sys/dev/ic/ath.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index ca7b959ed7b..2cdb1186f2b 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.46 2006/02/20 20:12:13 damien Exp $ */ +/* $OpenBSD: ath.c,v 1.47 2006/03/25 22:41:42 djm Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -936,7 +936,7 @@ ath_start(struct ifnet *ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif /* @@ -2008,7 +2008,7 @@ ath_rx_proc(void *arg, int npending) mb.m_next = m; mb.m_pkthdr.len += mb.m_len; - bpf_mtap(sc->sc_drvbpf, &mb); + bpf_mtap(sc->sc_drvbpf, &mb, BPF_DIRECTION_IN); } #endif @@ -2378,7 +2378,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, #if NBPFILTER > 0 if (ic->ic_rawbpf) - bpf_mtap(ic->ic_rawbpf, m0); + bpf_mtap(ic->ic_rawbpf, m0, BPF_DIRECTION_OUT); if (sc->sc_drvbpf) { struct mbuf mb; @@ -2399,7 +2399,7 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, mb.m_len = sc->sc_txtap_len; mb.m_next = m0; mb.m_pkthdr.len += mb.m_len; - bpf_mtap(sc->sc_drvbpf, &mb); + bpf_mtap(sc->sc_drvbpf, &mb, BPF_DIRECTION_OUT); } #endif |