Print this page
8725 Update TCP's RTO even if incoming segment's TSecr is 0
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: ken mays <maybird1776@yahoo.com>
Reviewed by: Toomas Soome <tsoome@me.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp_input.c
          +++ new/usr/src/uts/common/inet/tcp/tcp_input.c
↓ open down ↓ 4297 lines elided ↑ open up ↑
4298 4298                  }
4299 4299                  tcp->tcp_cwnd = MIN(cwnd + add, tcp->tcp_cwnd_max);
4300 4300          }
4301 4301  
4302 4302          /* See if the latest urgent data has been acknowledged */
4303 4303          if ((tcp->tcp_valid_bits & TCP_URG_VALID) &&
4304 4304              SEQ_GT(seg_ack, tcp->tcp_urg))
4305 4305                  tcp->tcp_valid_bits &= ~TCP_URG_VALID;
4306 4306  
4307 4307          /* Can we update the RTT estimates? */
4308      -        if (tcp->tcp_snd_ts_ok) {
4309      -                /* Ignore zero timestamp echo-reply. */
4310      -                if (tcpopt.tcp_opt_ts_ecr != 0) {
4311      -                        tcp_set_rto(tcp, (int32_t)LBOLT_FASTPATH -
4312      -                            (int32_t)tcpopt.tcp_opt_ts_ecr);
4313      -                }
     4308 +        if (tcp->tcp_snd_ts_ok && tcpopt.tcp_opt_ts_ecr != 0) {
     4309 +                tcp_set_rto(tcp, (int32_t)LBOLT_FASTPATH -
     4310 +                    (int32_t)tcpopt.tcp_opt_ts_ecr);
4314 4311  
4315 4312                  /* If needed, restart the timer. */
4316 4313                  if (tcp->tcp_set_timer == 1) {
4317 4314                          TCP_TIMER_RESTART(tcp, tcp->tcp_rto);
4318 4315                          tcp->tcp_set_timer = 0;
4319 4316                  }
4320 4317                  /*
4321 4318                   * Update tcp_csuna in case the other side stops sending
4322 4319                   * us timestamps.
4323 4320                   */
↓ open down ↓ 1462 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX