diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index d762c410e..9c7306911 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -34,6 +34,9 @@ const ( // MaxRTO is the maximum allowed value for the retransmit timeout. MaxRTO = 120 * time.Second + // MinSRTT is the minimum allowed value for smoothed RTT. + MinSRTT = 1 * time.Millisecond + // InitialCwnd is the initial congestion window. InitialCwnd = 10 @@ -384,6 +387,10 @@ func (s *sender) updateRTO(rtt time.Duration) { } } + if s.rtt.TCPRTTState.SRTT < MinSRTT { + s.rtt.TCPRTTState.SRTT = MinSRTT + } + s.RTO = s.rtt.TCPRTTState.SRTT + 4*s.rtt.TCPRTTState.RTTVar s.rtt.Unlock() if s.RTO < s.minRTO {