summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-07-29 21:13:08 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-07-29 21:13:08 +0000
commit418e848f1f9b47f2da46384b5d36b94c40f31075 (patch)
tree2421dee5960d7d072091095dc2789274fc97f760 /sys
parent5093f80ce7061096b622d1aedf3f1a4d88770580 (diff)
Don't do checksumming unless we're doing IP-in-IP.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 915ba74f856..21f17af10a3 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.32 1998/06/30 23:50:17 provos Exp $ */
+/* $OpenBSD: ip_output.c,v 1.33 1998/07/29 21:13:07 angelos Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -340,9 +340,6 @@ ip_output(m0, va_alist)
}
}
- /* Now fix the checksum */
- ip->ip_sum = in_cksum(m, hlen);
-
#ifdef ENCDEBUG
if (encdebug) {
printf("ip_output(): tdb=%08x, tdb->tdb_xform=0x%x,",
@@ -412,6 +409,11 @@ ip_output(m0, va_alist)
}
}
+ /*
+ * Fix checksum here, AH and ESP fix the
+ * checksum in their output routines.
+ */
+ ip->ip_sum = in_cksum(m, hlen);
error = ipe4_output(m, gw, tdb, &mp);
if (mp == NULL)
error = EFAULT;