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/isa/if_ex.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/isa/if_ex.c')
-rw-r--r-- | sys/dev/isa/if_ex.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c index ff2bdfb5217..15fa160c3b8 100644 --- a/sys/dev/isa/if_ex.c +++ b/sys/dev/isa/if_ex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ex.c,v 1.14 2005/11/09 05:46:21 brad Exp $ */ +/* $OpenBSD: if_ex.c,v 1.15 2006/03/25 22:41:44 djm Exp $ */ /* * Copyright (c) 1997, Donald A. Schmidt * Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es) @@ -543,7 +543,8 @@ ex_start(ifp) sc->tx_tail = next; #if NBPFILTER > 0 if (ifp->if_bpf != NULL) - bpf_mtap(ifp->if_bpf, opkt); + bpf_mtap(ifp->if_bpf, opkt, + BPF_DIRECTION_OUT); #endif ifp->if_timer = 2; ifp->if_opackets++; @@ -752,7 +753,8 @@ ex_rx_intr(sc) #endif #if NBPFILTER > 0 if (ifp->if_bpf != NULL) - bpf_mtap(ifp->if_bpf, ipkt); + bpf_mtap(ifp->if_bpf, ipkt, + BPF_DIRECTION_IN); #endif ether_input_mbuf(ifp, ipkt); ifp->if_ipackets++; |