Commit 66555e92 authored by Yuchung Cheng's avatar Yuchung Cheng Committed by David S. Miller

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: default avatarYuchung Cheng <ycheng@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 700163db
...@@ -5649,8 +5649,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack, ...@@ -5649,8 +5649,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
* the remote receives only the retransmitted (regular) SYNs: either * the remote receives only the retransmitted (regular) SYNs: either
* the original SYN-data or the corresponding SYN-ACK is lost. * the original SYN-data or the corresponding SYN-ACK is lost.
*/ */
syn_drop = (cookie->len <= 0 && data && syn_drop = (cookie->len <= 0 && data && tp->total_retrans);
inet_csk(sk)->icsk_retransmits);
tcp_fastopen_cache_set(sk, mss, cookie, syn_drop); tcp_fastopen_cache_set(sk, mss, cookie, syn_drop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment