tcp: clear tp->total_retrans in tcp_disconnect()
[ Upstream commit c13c48c00a6bc1febc73902505bdec0967bd7095 ] total_retrans needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: SeongJae Park <sjpark@amazon.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
73c29d2f6f
commit
ad871646b0
@ -2261,6 +2261,7 @@ int tcp_disconnect(struct sock *sk, int flags)
|
||||
tp->window_clamp = 0;
|
||||
tcp_set_ca_state(sk, TCP_CA_Open);
|
||||
tcp_clear_retrans(tp);
|
||||
tp->total_retrans = 0;
|
||||
inet_csk_delack_init(sk);
|
||||
/* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
|
||||
* issue in __tcp_select_window()
|
||||
|
Loading…
x
Reference in New Issue
Block a user