diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2015-05-31 12:11:05 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2015-05-31 12:11:05 +0000 |
commit | 0239602b83b2819edc687a22d472b8cf1facb1e2 (patch) | |
tree | ad161eb22b5a8fb35e2d5c9a9a1a23c3d1e99e5b | |
parent | 7fc593dd820fa44f7ef05f5a5614f7a2e67134e9 (diff) | |
download | src-0239602b83b2819edc687a22d472b8cf1facb1e2.tar.gz src-0239602b83b2819edc687a22d472b8cf1facb1e2.zip |
A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
applies to UDP and UDP-Lite.
MFC after: 3 days
Notes
Notes:
svn path=/head/; revision=283819
-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 9ec655f5bdb2..28ba67b51f2d 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 |