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/net/if_vlan.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/net/if_vlan.c')
-rw-r--r-- | sys/net/if_vlan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index cbece492c66..739dcbef0c2 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.64 2006/03/04 22:40:16 brad Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.65 2006/03/25 22:41:48 djm Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -201,7 +201,7 @@ vlan_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 /* @@ -315,7 +315,8 @@ vlan_input(eh, m) #if NBPFILTER > 0 if (ifv->ifv_if.if_bpf) - bpf_mtap_hdr(ifv->ifv_if.if_bpf, (char *)eh, ETHER_HDR_LEN, m); + bpf_mtap_hdr(ifv->ifv_if.if_bpf, (char *)eh, ETHER_HDR_LEN, + m, BPF_DIRECTION_IN); #endif ifv->ifv_if.if_ipackets++; ether_input(&ifv->ifv_if, eh, m); |