Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit cd736d8

Browse files
yuchungchengdavem330
authored andcommitted
tcp: fix retrans timestamp on passive Fast Open
Commit c7d13c8 ("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: c7d13c8 ("tcp: properly track retry time on passive Fast Open") Signed-off-by: Yuchung Cheng <[email protected]> Signed-off-by: Neal Cardwell <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 35c99ff commit cd736d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv4/tcp_input.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6024,6 +6024,9 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
60246024
static void tcp_rcv_synrecv_state_fastopen(struct sock *sk)
60256025
{
60266026
tcp_try_undo_loss(sk, false);
6027+
6028+
/* Reset rtx states to prevent spurious retransmits_timed_out() */
6029+
tcp_sk(sk)->retrans_stamp = 0;
60276030
inet_csk(sk)->icsk_retransmits = 0;
60286031

60296032
/* Once we leave TCP_SYN_RECV or TCP_FIN_WAIT_1,

0 commit comments

Comments
 (0)