summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-11-27 15:53:51 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-11-27 15:53:51 +0000
commit519d9d522fbd50f0325eb7faacc9984958ac7b62 (patch)
tree0c37d01e90703bc0c528aebb09cb55853d98c603 /sys
parent95354acda5611ca26c328a43628b92d2603c444d (diff)
Move bpf_mtap() after trunk_*_input() so that we hopefull see only one
copy of the packet with bpf. ok reyk@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_trunk.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index 72e562ee6ef..2e0ca2d7b2c 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.13 2005/11/27 15:46:04 mcbride Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.14 2005/11/27 15:53:50 mcbride Exp $ */
/*
* Copyright (c) 2005 Reyk Floeter <reyk@vantronix.net>
@@ -871,15 +871,16 @@ trunk_start(struct ifnet *ifp)
if (m == NULL)
break;
+ if (tr->tr_proto != TRUNK_PROTO_NONE)
+ error = (*tr->tr_start)(tr, m);
+ else
+ m_free(m);
+
#if NBPFILTER > 0
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m);
#endif
- if (tr->tr_proto != TRUNK_PROTO_NONE)
- error = (*tr->tr_start)(tr, m);
- else
- m_free(m);
if (error == 0)
ifp->if_opackets++;
else