summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2012-11-05 21:49:16 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2012-11-05 21:49:16 +0000
commit6db777a6add6abfd8aae258389ca30934e4553dc (patch)
treef3cb2bdc1ef2453ed70f4ea45ce417ba9437c1e7 /sys/netinet
parent0a544fe6b28728bcb29f8b945a32f7aaf70abcc8 (diff)
Make sure that in[6]_proto_cksum_out() is called unconditinally and not
inside the NPF block. Fixes checksum issues seen on ramdisk kernels. Initial diff by naddy@, tested and OK by many
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 31efc7ffe5c..a156cb44833 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.233 2012/11/01 07:55:56 henning Exp $ */
+/* $OpenBSD: ip_output.c,v 1.234 2012/11/05 21:49:15 claudio Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -617,7 +617,6 @@ sendit:
splx(s);
goto done;
}
- in_proto_cksum_out(m, encif);
ip = mtod(m, struct ip *);
hlen = ip->ip_hl << 2;
/*
@@ -628,6 +627,7 @@ sendit:
* What's the behaviour?
*/
#endif
+ in_proto_cksum_out(m, encif);
/* Check if we are allowed to fragment */
if (ip_mtudisc && (ip->ip_off & htons(IP_DF)) && tdb->tdb_mtu &&
@@ -709,7 +709,6 @@ sendit:
}
if (m == NULL)
goto done;
- in_proto_cksum_out(m, ifp);
ip = mtod(m, struct ip *);
hlen = ip->ip_hl << 2;
if ((m->m_pkthdr.pf.flags & (PF_TAG_REROUTE | PF_TAG_GENERATED)) ==
@@ -724,6 +723,7 @@ sendit:
goto reroute;
}
#endif
+ in_proto_cksum_out(m, ifp);
#ifdef IPSEC
if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) &&