fix round-trip timing: rexmt timer shouldn't screw rtt up,
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Thu, 1 Nov 1984 06:03:21 +0000 (22:03 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Thu, 1 Nov 1984 06:03:21 +0000 (22:03 -0800)
but careful when retransmitting timed segment

SCCS-vsn: sys/netinet/tcp_timer.c 6.3

usr/src/sys/netinet/tcp_timer.c

index 5cf2c77..a8d8097 100644 (file)
@@ -1,4 +1,4 @@
-/*     tcp_timer.c     6.3     84/10/18        */
+/*     tcp_timer.c     6.3     84/10/31        */
 
 #include "param.h"
 #include "systm.h"
 
 #include "param.h"
 #include "systm.h"
@@ -148,7 +148,11 @@ tcp_timers(tp, timer)
                            TCPTV_MIN, TCPTV_MAX);
                }
                tp->snd_nxt = tp->snd_una;
                            TCPTV_MIN, TCPTV_MAX);
                }
                tp->snd_nxt = tp->snd_una;
-               /* this only transmits one segment! */
+               /*
+                * If timing a segment in this window, stop the timer.
+                */
+               if (tp->t_rtt && SEQ_GT(tp->t_rtseq, tp->snd_una))
+                       tp->t_rtt = 0;
                (void) tcp_output(tp);
                break;
 
                (void) tcp_output(tp);
                break;