diff options
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 40de2d2364a1..05be564414e9 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -198,8 +198,13 @@ static bool retransmits_timed_out(struct sock *sk, | |||
198 | return false; | 198 | return false; |
199 | 199 | ||
200 | start_ts = tcp_sk(sk)->retrans_stamp; | 200 | start_ts = tcp_sk(sk)->retrans_stamp; |
201 | if (likely(timeout == 0)) | 201 | if (likely(timeout == 0)) { |
202 | timeout = tcp_model_timeout(sk, boundary, TCP_RTO_MIN); | 202 | unsigned int rto_base = TCP_RTO_MIN; |
203 | |||
204 | if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) | ||
205 | rto_base = tcp_timeout_init(sk); | ||
206 | timeout = tcp_model_timeout(sk, boundary, rto_base); | ||
207 | } | ||
203 | 208 | ||
204 | return (s32)(tcp_time_stamp(tcp_sk(sk)) - start_ts - timeout) >= 0; | 209 | return (s32)(tcp_time_stamp(tcp_sk(sk)) - start_ts - timeout) >= 0; |
205 | } | 210 | } |