diff options
author | tuexen <tuexen@FreeBSD.org> | 2015-05-31 12:11:05 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2015-05-31 12:11:05 +0000 |
commit | e5205dfbe6a4a89c33c41d5aed1544d47e27af75 (patch) | |
tree | ad161eb22b5a8fb35e2d5c9a9a1a23c3d1e99e5b /contrib/traceroute | |
parent | 7b87a7e6ff163e23d401b03c526e9a672a095596 (diff) | |
download | FreeBSD-src-e5205dfbe6a4a89c33c41d5aed1544d47e27af75.zip FreeBSD-src-e5205dfbe6a4a89c33c41d5aed1544d47e27af75.tar.gz |
A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
applies to UDP and UDP-Lite.
MFC after: 3 days
Diffstat (limited to 'contrib/traceroute')
-rw-r--r-- | contrib/traceroute/traceroute.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index 9ec655f..28ba67b 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -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 |