diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
commit | 24436414aab60dc84348ec54f23b324b4ae862a3 (patch) | |
tree | ee35283622a78eeac5656cb5661954771faf6520 /sys/dev/ic/ath.c | |
parent | d1265a1a72755bd0209950654a6df47287781241 (diff) |
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 |