Skip to content

Commit

Permalink
tcp: detect SYN/data drop when F-RTO is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuchung Cheng authored and David S. Miller committed Jan 31, 2013
1 parent 700163d commit 66555e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 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);

Expand Down

0 comments on commit 66555e9

Please sign in to comment.