summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2014-01-24 09:48:38 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2014-01-24 09:48:38 +0000
commit04552c0160ae8925497d5ffe8e220d019e5ab606 (patch)
tree74b53bf7b0f579caceeac3d32a643c28f3985ec9 /sys
parent9c091edf10ae6bf1697aaa9e2763c29a8dcece4f (diff)
computing the ip csum just before the bpf mtap and only if there is a
consumer just to please tcpdump is stupid and not done anywhere else. kill with fire. ok benno
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_pflow.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/net/if_pflow.c b/sys/net/if_pflow.c
index af7453c5974..07ddf122283 100644
--- a/sys/net/if_pflow.c
+++ b/sys/net/if_pflow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflow.c,v 1.39 2014/01/21 21:27:14 benno Exp $ */
+/* $OpenBSD: if_pflow.c,v 1.40 2014/01/24 09:48:37 henning Exp $ */
/*
* Copyright (c) 2011 Florian Obser <florian@narrans.de>
@@ -1544,10 +1544,8 @@ pflow_sendout_mbuf(struct pflow_softc *sc, struct mbuf *m)
ip->ip_len = htons(sizeof(struct udpiphdr) + len);
#if NBPFILTER > 0
- if (ifp->if_bpf) {
- ip->ip_sum = in_cksum(m, ip->ip_hl << 2);
+ if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
- }
#endif
sc->sc_if.if_opackets++;