mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
tcp: fix retrans timestamp on passive Fast Open
Commitc7d13c8faa
("tcp: properly track retry time on passive Fast Open") sets the start of SYNACK retransmission time on passive Fast Open in "retrans_stamp". However the timestamp is not reset upon the handshake has completed. As a result, future data packet retransmission may not update it in tcp_retransmit_skb(). This may lead to socket aborting earlier unexpectedly by retransmits_timed_out() since retrans_stamp remains the SYNACK rtx time. This bug only manifests on passive TFO sender that a) suffered SYNACK timeout and then b) stalls on very first loss recovery. Any successful loss recovery would reset the timestamp to avoid this issue. Fixes:c7d13c8faa
("tcp: properly track retry time on passive Fast Open") Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
35c99ffa20
commit
cd736d8b67
@ -6024,6 +6024,9 @@ reset_and_undo:
|
||||
static void tcp_rcv_synrecv_state_fastopen(struct sock *sk)
|
||||
{
|
||||
tcp_try_undo_loss(sk, false);
|
||||
|
||||
/* Reset rtx states to prevent spurious retransmits_timed_out() */
|
||||
tcp_sk(sk)->retrans_stamp = 0;
|
||||
inet_csk(sk)->icsk_retransmits = 0;
|
||||
|
||||
/* Once we leave TCP_SYN_RECV or TCP_FIN_WAIT_1,
|
||||
|
Loading…
Reference in New Issue
Block a user