summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-04-02 16:18:26 +0000
committershin <shin@FreeBSD.org>2000-04-02 16:18:26 +0000
commit7a67542f8ae9daf5d950442362e85e4fca8c81a8 (patch)
tree6d92b1bb8abdd75de65bf3abdff7fde1b158fda7 /sys
parent484d3fa1b115d5ed2560c12d2feb1b40639b6ea3 (diff)
downloadFreeBSD-src-7a67542f8ae9daf5d950442362e85e4fca8c81a8.zip
FreeBSD-src-7a67542f8ae9daf5d950442362e85e4fca8c81a8.tar.gz
Move htons() ip_len to after the in_delayed_cksum() call.
This should stop cksum error messages on IPsec communication which was reported on freebsd-current. Reviewed by: jlemon
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 60d34f7..bd75266 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -688,11 +688,6 @@ pass:
default:
printf("ip_output: Invalid policy found. %d\n", sp->policy);
}
-
- ip->ip_len = htons((u_short)ip->ip_len);
- ip->ip_off = htons((u_short)ip->ip_off);
- ip->ip_sum = 0;
-
{
struct ipsec_output_state state;
bzero(&state, sizeof(state));
@@ -704,6 +699,8 @@ pass:
state.ro = ro;
state.dst = (struct sockaddr *)dst;
+ ip->ip_sum = 0;
+
/*
* XXX
* delayed checksums are not currently compatible with IPsec
@@ -713,6 +710,9 @@ pass:
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
}
+ ip->ip_len = htons((u_short)ip->ip_len);
+ ip->ip_off = htons((u_short)ip->ip_off);
+
error = ipsec4_output(&state, sp, flags);
m = state.m;
OpenPOWER on IntegriCloud