A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
applies to UDP and UDP-Lite. MFC after: 3 days
This commit is contained in:
parent
7b87a7e6ff
commit
e5205dfbe6
@ -1470,10 +1470,8 @@ tcp_prep(struct outdata *outdata)
|
||||
tcp->th_flags = TH_SYN;
|
||||
tcp->th_sum = 0;
|
||||
|
||||
if (doipcksum) {
|
||||
u_short sum = p_cksum(outip, (u_short*)tcp, protlen, protlen);
|
||||
tcp->th_sum = (sum) ? sum : 0xffff;
|
||||
}
|
||||
if (doipcksum)
|
||||
tcp->th_sum = p_cksum(outip, (u_short*)tcp, protlen, protlen);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user