[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200131171914.24433-1-sjpark@amazon.com>
Date: Fri, 31 Jan 2020 18:19:14 +0100
From: <sjpark@...zon.com>
To: Eric Dumazet <edumazet@...gle.com>
CC: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Neal Cardwell <ncardwell@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>,
SeongJae Park <sjpark@...zon.de>
Subject: Re: [PATCH net] tcp: clear tp->total_retrans in tcp_disconnect()
On Fri, 31 Jan 2020 09:14:47 -0800 Eric Dumazet <edumazet@...gle.com> wrote:
> 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@...gle.com>
> Cc: SeongJae Park <sjpark@...zon.de>
> ---
> net/ipv4/tcp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 484485ae74c26eb43d49d972e068bcf5d0e33d58..dd57f1e3618160c1e51d6ff54afa984292614e5c 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -2626,6 +2626,7 @@ int tcp_disconnect(struct sock *sk, int flags)
> tcp_set_ca_state(sk, TCP_CA_Open);
> tp->is_sack_reneg = 0;
> 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()
Reviewed-by: SeongJae Park <sjpark@...zon.de>
> --
> 2.25.0.341.g760bfbb309-goog
Powered by blists - more mailing lists