diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-01-04 17:51:40 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-01-04 17:51:40 +0000 |
commit | d4b4d0e6698ba0753598919778a12c75d413618a (patch) | |
tree | aa6f16d7cc7482f0e06b2a2362ae61966773adc8 /sys/net | |
parent | 299016460ebea82d40ba5cd2da5579820b7f164b (diff) |
Move bpf_mtap_hdr() after trunk_*_input() so that we hopefully see only one
copy of the packet with bpf.
From mcbride@
some testing by todd@, ok reyk@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_trunk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c index 08da7ec40cd..63bcce2e330 100644 --- a/sys/net/if_trunk.c +++ b/sys/net/if_trunk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.c,v 1.19 2006/01/04 06:04:42 canacar Exp $ */ +/* $OpenBSD: if_trunk.c,v 1.20 2006/01/04 17:51:39 brad Exp $ */ /* * Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org> @@ -925,15 +925,15 @@ trunk_input(struct ifnet *ifp, struct ether_header *eh, struct mbuf *m) goto bad; trifp = &tr->tr_ac.ac_if; + error = (*tr->tr_input)(tr, tp, eh, m); + if (error != 0) + goto bad; + #if NBPFILTER > 0 if (trifp->if_bpf) bpf_mtap_hdr(trifp->if_bpf, (char *)eh, ETHER_HDR_LEN, m); #endif - error = (*tr->tr_input)(tr, tp, eh, m); - if (error != 0) - goto bad; - trifp->if_ipackets++; return (0); |