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_trunk.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_trunk.c')
-rw-r--r-- | sys/net/if_trunk.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 09c042ba43f..3b6c97e6106 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.22 2006/03/11 03:12:36 brad Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.23 2006/03/25 22:41:47 djm Exp $ */ /* * Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org> @@ -874,7 +874,7 @@ trunk_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 if (tr->tr_proto != TRUNK_PROTO_NONE) @@ -931,7 +931,8 @@ trunk_input(struct ifnet *ifp, struct ether_header *eh, struct mbuf *m) #if NBPFILTER > 0 if (trifp->if_bpf) - bpf_mtap_hdr(trifp->if_bpf, (char *)eh, ETHER_HDR_LEN, m); + bpf_mtap_hdr(trifp->if_bpf, (char *)eh, ETHER_HDR_LEN, m, + BPF_DIRECTION_IN); #endif trifp->if_ipackets++; |