summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2013-10-19 10:47:53 +0000
committerhenning <henning@openbsd.org>2013-10-19 10:47:53 +0000
commit83617de96c37ad93653ecce1cb6b535e8f1efdc7 (patch)
tree3b10500f955452313aedb8370ac1ddaf3f7af096
parentmake in_proto_cksum_out not rely on the pseudo header checksum to be (diff)
downloadwireguard-openbsd-83617de96c37ad93653ecce1cb6b535e8f1efdc7.tar.xz
wireguard-openbsd-83617de96c37ad93653ecce1cb6b535e8f1efdc7.zip
pf_cksum doesn't need to compute the pseudo hdr cksum any more.
ok lteo florian
-rw-r--r--sys/net/pf.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 15d53bfcbb5..1322ce6bc62 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.844 2013/10/17 16:27:41 bluhm Exp $ */
+/* $OpenBSD: pf.c,v 1.845 2013/10/19 10:47:53 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -6742,20 +6742,10 @@ pf_cksum(struct pf_pdesc *pd, struct mbuf *m)
switch (pd->proto) {
case IPPROTO_TCP:
pd->hdr.tcp->th_sum = 0;
- if (pd->af == AF_INET) {
- pd->hdr.tcp->th_sum = in_cksum_phdr(pd->src->v4.s_addr,
- pd->dst->v4.s_addr, htons(pd->tot_len -
- pd->off + IPPROTO_TCP));
- }
m->m_pkthdr.csum_flags |= M_TCP_CSUM_OUT;
break;
case IPPROTO_UDP:
pd->hdr.udp->uh_sum = 0;
- if (pd->af == AF_INET) {
- pd->hdr.udp->uh_sum = in_cksum_phdr(pd->src->v4.s_addr,
- pd->dst->v4.s_addr, htons(pd->tot_len -
- pd->off + IPPROTO_UDP));
- }
m->m_pkthdr.csum_flags |= M_UDP_CSUM_OUT;
break;
case IPPROTO_ICMP: