--- cci/sys/netinet/tcp_output.c 2019/07/28 12:24:19 1.1 +++ cci/sys/netinet/tcp_output.c 2019/07/28 12:29:36 1.1.1.2 @@ -272,16 +272,17 @@ noopt: if (flags & (TH_SYN|TH_FIN)) tp->snd_nxt++; tp->snd_nxt += len; - if (SEQ_GT(tp->snd_nxt, tp->snd_max)) + if (SEQ_GT(tp->snd_nxt, tp->snd_max)) { tp->snd_max = tp->snd_nxt; - /* - * Time this transmission if not a retransmission and - * not currently timing anything. - */ - if (SEQ_GT(tp->snd_nxt, tp->snd_max) && tp->t_rtt == 0) { - tp->t_rtt = 1; - tp->t_rtseq = tp->snd_nxt - len; + /* + * Time this transmission if not a retransmission + * and not currently timing anything. + */ + if (tp->t_rtt == 0) { + tp->t_rtt = 1; + tp->t_rtseq = tp->snd_nxt - len; + } } /* @@ -293,8 +294,9 @@ noopt: if (tp->t_timer[TCPT_REXMT] == 0 && tp->snd_nxt != tp->snd_una) { TCPT_RANGESET(tp->t_timer[TCPT_REXMT], - tcp_beta * tp->t_srtt, TCPTV_MIN, TCPTV_MAX); - tp->t_rtt = 0; + tcp_beta * (tp->t_srtt?tp->t_srtt:1), + TCPTV_MIN, TCPTV_MAX); + /* tp->t_rtt = 0; */ tp->t_rxtshift = 0; } tp->t_timer[TCPT_PERSIST] = 0;