svn commit: r283819 - head/contrib/traceroute

Michael Tuexen tuexen at FreeBSD.org
Sun May 31 12:11:06 UTC 2015


Author: tuexen
Date: Sun May 31 12:11:05 2015
New Revision: 283819
URL: https://svnweb.freebsd.org/changeset/base/283819

Log:
  A TCP checksum of 0 is completely valid. Mapping 0 to 0xffff only
  applies to UDP and UDP-Lite.
  
  MFC after: 3 days

Modified:
  head/contrib/traceroute/traceroute.c

Modified: head/contrib/traceroute/traceroute.c
==============================================================================
--- head/contrib/traceroute/traceroute.c	Sun May 31 12:04:06 2015	(r283818)
+++ head/contrib/traceroute/traceroute.c	Sun May 31 12:11:05 2015	(r283819)
@@ -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


More information about the svn-src-all mailing list