tcp: clear tp->retrans_stamp in tcp_finish_connect()
Subsystems (3)
PATCH 1/1 tcp: clear tp->retrans_stamp in tcp_finish_connect()
tcp_connect() does :
tp->retrans_stamp = tcp_time_stamp(tp);
When 3WHS completes, we need to clear retrans_stamp otherwise various things can break.
This bug became more visible after commit b701a99e431d ("tcp: Add tcp_clamp_rto_to_user_timeout() helper to improve accuracy"), but predates git history.
--- net/ipv4/tcp_input.c | 1 + 1 file changed, 1 insertion(+)
net/ipv4/tcp_input.c +1 -0
@@ -5680,6 +5680,7 @@ void tcp_finish_connect(struct sock *sk, struct sk_buff *skb)* packet. */ tp->lsndtime = tcp_jiffies32; + tp->retrans_stamp =0 ;if (sock_flag (sk,SOCK_KEEPOPEN ))inet_csk_reset_keepalive_timer (sk,keepalive_time_when (tp));
Signature · 1 line
2.20.0.405.gbc1bbc6f85-goog
Quoted 8 lines · Eric Dumazet
tcp_connect()does :tp->retrans_stamp = tcp_time_stamp(tp);When 3WHS completes, we need to clear
retrans_stampotherwise various things can break.
Quoted 7 lines
This bug became more visible after commit
b701a99e431d("tcp: Addtcp_clamp_rto_to_user_timeout()helper to improve accuracy"), but predates git history.Signed-off-by Eric Dumazet <[email protected]>---
Thanks!
neal
Quoted 7 lines · Eric Dumazet
tcp_connect()does :tp->retrans_stamp = tcp_time_stamp(tp);When 3WHS completes, we need to clear
retrans_stampotherwise various things can break.
Quoted 6 lines
This bug became more visible after commit
b701a99e431d("tcp: Addtcp_clamp_rto_to_user_timeout()helper to improve accuracy"), but predates git history.Signed-off-by Eric Dumazet <[email protected]>
David please disregard this patch. tp->retrans_stamp is already cleared in tcp_clean_rtx_queue() when the SYN packet is removed from rtx queue.
Thanks.
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Wed, 19 Dec 2018 15:27:19 -0800
Quoted 12 lines · Eric Dumazet
Quoted 11 lines
tcp_connect()does :tp->retrans_stamp = tcp_time_stamp(tp);When 3WHS completes, we need to clear
retrans_stampotherwise various things can break.This bug became more visible after commit
b701a99e431d("tcp: Addtcp_clamp_rto_to_user_timeout()helper to improve accuracy"), but predates git history.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Eric Dumazet <[email protected]>David please disregard this patch.
tp->retrans_stampis already cleared intcp_clean_rtx_queue()when the SYN packet is removed from rtx queue.
Ok.