summaryrefslogtreecommitdiffstats
path: root/sys/net/if_faith.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_faith.c')
-rw-r--r--sys/net/if_faith.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c
index a8da4ad..06e60cd 100644
--- a/sys/net/if_faith.c
+++ b/sys/net/if_faith.c
@@ -213,21 +213,8 @@ faithoutput(ifp, m, dst, rt)
}
if (ifp->if_bpf) {
- /*
- * We need to prepend the address family as
- * a four byte field. Cons up a faith header
- * to pacify bpf. This is safe because bpf
- * will only read from the mbuf (i.e., it won't
- * try to free it or keep a pointer a to it).
- */
- struct mbuf m0;
u_int32_t af = dst->sa_family;
-
- m0.m_next = m;
- m0.m_len = 4;
- m0.m_data = (char *)⁡
-
- BPF_MTAP(ifp, &m0);
+ bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m);
}
if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {
OpenPOWER on IntegriCloud