Subject: netinet/tcp_input.c - 1323 timestamp handling broken
To: None <tech-net@netbsd.org>
From: David Brownlee <abs@absd.org>
List: tech-net
Date: 04/17/2005 23:24:27
 	2.0_STABLE has the following change to netinet/tcp_input.c
 	(compared to 2.0.2 which does not exhibit this problem)

+       if (opti.ts_present && opti.ts_ecr) {
+               u_int32_t now;
+
+               /*
+                * Calculate the RTT from the returned time stamp and the
+                * connection's time base.  If the time stamp is later than
+                * the current time, fall back to non-1323 RTT calculation.
+                */
+               now = TCP_TIMESTAMP(tp);
+               if (SEQ_GEQ(now, opti.ts_ecr))
+                       opti.ts_ecr = now - opti.ts_ecr + 1;
+               else
+                       opti.ts_ecr = 0;
+       }
+

 	When sending many small packets on a LAN from a fast host
 	to a slow host, with rfc1323 enabled the tcp session will
 	occasionally stall for between ~5 seconds and several
 	minutes. With rfc1323 disabled, or with the above removed
 	the stalls are for less than a second.

 	The test case is 'dmesg | dd bs=1'.

 	Putting in printf() indicate the 'else' does not appear to
 	fire.




-- 
 			   David Brownlee -- abs@absd.org