From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130326173611.197001366@goodmis.org> Date: Tue, 26 Mar 2013 13:22:10 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yuchung Cheng , "David S. Miller" Subject: [PATCH 71/86] tcp: detect SYN/data drop when F-RTO is disabled References: <20130326172059.136127374@goodmis.org> Content-Disposition: inline; filename=0071-tcp-detect-SYN-data-drop-when-F-RTO-is-disabled.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuchung Cheng [ Upstream commit 9d475971466bf0e4c65a88d46031b8127a767897 ] 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 Signed-off-by: David S. Miller --- net/ipv4/tcp_input.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 41073d2..396c6ae 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5678,8 +5678,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack, * the remote receives only the retransmitted (regular) SYNs: either * the original SYN-data or the corresponding SYN-ACK is lost. */ - syn_drop = (cookie->len <= 0 && data && - inet_csk(sk)->icsk_retransmits); + syn_drop = (cookie->len <= 0 && data && tp->total_retrans); tcp_fastopen_cache_set(sk, mss, cookie, syn_drop); -- 1.7.10.4