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/pdq_ifsubr.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/pdq_ifsubr.c')
-rw-r--r-- | sys/dev/ic/pdq_ifsubr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/pdq_ifsubr.c b/sys/dev/ic/pdq_ifsubr.c index cb48c8bb3ce..9d499b2543b 100644 --- a/sys/dev/ic/pdq_ifsubr.c +++ b/sys/dev/ic/pdq_ifsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdq_ifsubr.c,v 1.17 2005/11/09 05:50:25 brad Exp $ */ +/* $OpenBSD: pdq_ifsubr.c,v 1.18 2006/03/25 22:41:43 djm Exp $ */ /* $NetBSD: pdq_ifsubr.c,v 1.5 1996/05/20 00:26:21 thorpej Exp $ */ /*- @@ -187,7 +187,7 @@ pdq_os_receive_pdu( sc->sc_if.if_ipackets++; #if NBPFILTER > 0 if (sc->sc_bpf != NULL) - PDQ_BPF_MTAP(sc, m); + PDQ_BPF_MTAP(sc, m, BPF_DIRECTION_IN); if ((fh->fddi_fc & (FDDIFC_L|FDDIFC_F)) != FDDIFC_LLC_ASYNC) { m_freem(m); return; @@ -223,7 +223,7 @@ pdq_os_transmit_done( pdq_softc_t *sc = (pdq_softc_t *) pdq->pdq_os_ctx; #if NBPFILTER > 0 if (sc->sc_bpf != NULL) - PDQ_BPF_MTAP(sc, m); + PDQ_BPF_MTAP(sc, m, BPF_DIRECTION_OUT); #endif m_freem(m); sc->sc_if.if_opackets++; |