1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
This commit is contained in:
Yoshinobu Inoue 2000-04-02 16:18:26 +00:00
parent 612c58996e
commit 7cba257ae5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58936

View File

@ -688,11 +688,6 @@ ip_output(m0, opt, ro, flags, imo)
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 @@ ip_output(m0, opt, ro, flags, imo)
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 @@ ip_output(m0, opt, ro, flags, imo)
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;