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_vr.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_vr.c')
-rw-r--r-- | sys/dev/pci/if_vr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 548b3446fee..25c331e20ee 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.60 2006/03/20 16:15:03 brad Exp $ */ +/* $OpenBSD: if_vr.c,v 1.61 2006/03/25 22:41:46 djm Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1022,7 +1022,7 @@ vr_rxeof(struct vr_softc *sc) * Handle BPF listeners. Let the BPF user see the packet. */ if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m0); + bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_IN); #endif /* pass it on. */ ether_input_mbuf(ifp, m0); @@ -1345,7 +1345,8 @@ vr_start(struct ifnet *ifp) * to him. */ if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, cur_tx->vr_mbuf); + bpf_mtap(ifp->if_bpf, cur_tx->vr_mbuf, + BPF_DIRECTION_OUT); #endif cur_tx = cur_tx->vr_nextdesc; } |