diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2005-11-27 15:53:51 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2005-11-27 15:53:51 +0000 |
commit | 519d9d522fbd50f0325eb7faacc9984958ac7b62 (patch) | |
tree | 0c37d01e90703bc0c528aebb09cb55853d98c603 /sys/net/if_trunk.c | |
parent | 95354acda5611ca26c328a43628b92d2603c444d (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/net/if_trunk.c')
-rw-r--r-- | sys/net/if_trunk.c | 11 |
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 |