aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2013-01-31 14:16:46 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-31 14:20:07 -0500
commit66555e92fb7a619188c02cceae4bbc414f15f96d (patch)
treec64ca59aef09b3d659223e71f9282631a9289787 /net
parent700163db3de397a7557831e1eb9b8ce60e55590a (diff)
tcp: detect SYN/data drop when F-RTO is disabled
On receiving the SYN-ACK, Fast Open checks icsk_retransmit for SYN retransmission to detect SYN/data drops. But if F-RTO is disabled, icsk_retransmit is reset at step D of tcp_fastretrans_alert() ( under tcp_ack()) before tcp_rcv_fastopen_synack(). The fix is to use total_retrans instead which accounts for SYN retransmission regardless the use of F-RTO. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 18f97ca76b00..8aca4ee95ff9 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5649,8 +5649,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
5649 * the remote receives only the retransmitted (regular) SYNs: either 5649 * the remote receives only the retransmitted (regular) SYNs: either
5650 * the original SYN-data or the corresponding SYN-ACK is lost. 5650 * the original SYN-data or the corresponding SYN-ACK is lost.
5651 */ 5651 */
5652 syn_drop = (cookie->len <= 0 && data && 5652 syn_drop = (cookie->len <= 0 && data && tp->total_retrans);
5653 inet_csk(sk)->icsk_retransmits);
5654 5653
5655 tcp_fastopen_cache_set(sk, mss, cookie, syn_drop); 5654 tcp_fastopen_cache_set(sk, mss, cookie, syn_drop);
5656 5655