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/pci/if_lmc.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/pci/if_lmc.c')
-rw-r--r-- | sys/dev/pci/if_lmc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c index 86b02a7abf9..a3a570bbc8b 100644 --- a/sys/dev/pci/if_lmc.c +++ b/sys/dev/pci/if_lmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lmc.c,v 1.21 2006/03/16 21:36:58 miod Exp $ */ +/* $OpenBSD: if_lmc.c,v 1.22 2006/03/25 22:41:45 djm Exp $ */ /* $NetBSD: if_lmc.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */ /*- @@ -616,9 +616,10 @@ lmc_rx_intr(lmc_softc_t * const sc) #if NBPFILTER > 0 if (sc->lmc_bpf != NULL) { if (me == ms) - LMC_BPF_TAP(sc, mtod(ms, caddr_t), total_len); + LMC_BPF_TAP(sc, mtod(ms, caddr_t), + total_len, BPF_DIRECTION_IN); else - LMC_BPF_MTAP(sc, ms); + LMC_BPF_MTAP(sc, ms, BPF_DIRECTION_IN); } #endif sc->lmc_flags |= LMC_RXACT; @@ -772,7 +773,7 @@ lmc_tx_intr(lmc_softc_t * const sc) sc->lmc_txmaps[sc->lmc_txmaps_free++] = map; #if NBPFILTER > 0 if (sc->lmc_bpf != NULL) - LMC_BPF_MTAP(sc, m); + LMC_BPF_MTAP(sc, m, BPF_DIRECTION_OUT); #endif m_freem(m); #if defined(LMC_DEBUG) |