summaryrefslogtreecommitdiff
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 93eddc654a9..0626359bb1e 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.79 2012/01/16 03:34:58 guenther Exp $ */
+/* $OpenBSD: bpf.c,v 1.80 2012/04/14 09:39:46 yasuoka Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -1247,11 +1247,13 @@ void
bpf_mtap_af(caddr_t arg, u_int32_t af, struct mbuf *m, u_int direction)
{
struct m_hdr mh;
+ u_int32_t afh;
mh.mh_flags = 0;
mh.mh_next = m;
mh.mh_len = 4;
- mh.mh_data = (caddr_t)⁡
+ afh = htonl(af);
+ mh.mh_data = (caddr_t)&afh;
bpf_mtap(arg, (struct mbuf *) &mh, direction);
m->m_flags |= mh.mh_flags & M_FILDROP;