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

Commit 6eb2f6b

Browse files
gregkhTreehugger Robot
authored andcommitted
Revert "tcp: fix TFO SYN_RECV to not zero retrans_stamp with retransmits out"
This reverts commit 2daffbd which is commit 27c80ef upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: Id7b3803b6df3424c52939cd7503aae4e2afa6c88 Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7fc395e commit 6eb2f6b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

net/ipv4/tcp_input.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6570,17 +6570,10 @@ static void tcp_rcv_synrecv_state_fastopen(struct sock *sk)
65706570
if (inet_csk(sk)->icsk_ca_state == TCP_CA_Loss && !tp->packets_out)
65716571
tcp_try_undo_recovery(sk);
65726572

6573+
/* Reset rtx states to prevent spurious retransmits_timed_out() */
65736574
tcp_update_rto_time(tp);
6575+
tp->retrans_stamp = 0;
65746576
inet_csk(sk)->icsk_retransmits = 0;
6575-
/* In tcp_fastopen_synack_timer() on the first SYNACK RTO we set
6576-
* retrans_stamp but don't enter CA_Loss, so in case that happened we
6577-
* need to zero retrans_stamp here to prevent spurious
6578-
* retransmits_timed_out(). However, if the ACK of our SYNACK caused us
6579-
* to enter CA_Recovery then we need to leave retrans_stamp as it was
6580-
* set entering CA_Recovery, for correct retransmits_timed_out() and
6581-
* undo behavior.
6582-
*/
6583-
tcp_retrans_stamp_cleanup(sk);
65846577

65856578
/* Once we leave TCP_SYN_RECV or TCP_FIN_WAIT_1,
65866579
* we no longer need req so release it.

0 commit comments

Comments
 (0)