summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2013-06-26 09:12:41 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2013-06-26 09:12:41 +0000
commit2092a5a508fea02619356ab86e8fac0b9d17f62c (patch)
treef80658ce533adb3cde6fbcae84d133ac88ef775e /sys/netinet/ip_output.c
parentfeaa5c3eb6db1089559e6ecef2894b368b933037 (diff)
put the cksum diff back, of course with the bug fixed where we could
under some circumstances repair broken checksums on the way. ok ryan naddy mikeb . redo most of the protocol (tcp/udp/...) checksum handling -assume we have hardware checksum offloading. stop mucking with the checksum in most of the stack -stop checksum mucking in pf, just set a "needs checksumming" flag if needed -in all output pathes, very late, if we figure out the outbound interface doesn't have hw cksum offloading, do the cksum in software. this especially makes the bridge path behave like a regular output path -little special casing for bridge still required until the broadcast path loses its disgusting shortcut hacks, but at least it's in one place now and not all over the stack in6_proto_cksum_out mostly written by krw@ started at k2k11 in iceland more than 1.5 years ago - yes it took that long, this stuff is everything but easy. this happens to fix the infamous pf rdr bug that made us turn off proto cksum offloading on almost all interface drivers.
Diffstat (limited to 'sys/netinet/ip_output.c')
-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 ff34a3aa236..b59accf5569 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.241 2013/06/11 18:15:53 deraadt Exp $ */
+/* $OpenBSD: ip_output.c,v 1.242 2013/06/26 09:12:40 henning Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -613,6 +613,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 &&
@@ -683,8 +684,6 @@ sendit:
}
#endif /* IPSEC */
- in_proto_cksum_out(m, ifp);
-
/*
* Packet filter
*/
@@ -710,6 +709,7 @@ sendit:
goto reroute;
}
#endif
+ in_proto_cksum_out(m, ifp);
#ifdef IPSEC
if (ipsec_in_use && (flags & IP_FORWARDING) && (ipforwarding == 2) &&