tcp: reset timer after any SYNACK retransmit
[deliverable/linux.git] / net / ipv4 / tcp_minisocks.c
index 05eaf890461359131e8cd8a20d6adea0c7be740f..0f01788272595397cdc8c440f89d595bb6bed0dc 100644 (file)
@@ -551,8 +551,13 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
                 *
                 * Note that even if there is new data in the SYN packet
                 * they will be thrown away too.
+                *
+                * Reset timer after retransmitting SYNACK, similar to
+                * the idea of fast retransmit in recovery.
                 */
-               inet_rtx_syn_ack(sk, req);
+               if (!inet_rtx_syn_ack(sk, req))
+                       req->expires = min(TCP_TIMEOUT_INIT << req->num_timeout,
+                                          TCP_RTO_MAX) + jiffies;
                return NULL;
        }
 
This page took 0.054937 seconds and 5 git commands to generate.