diff options
author | Eric Dumazet <edumazet@google.com> | 2020-01-31 21:22:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-15 00:32:07 +0300 |
commit | 4d469d93a89ee0d9a77b5880b353f4c9dd6ef5e2 (patch) | |
tree | 56949915a3619f3ee3f8fd35ef65fc4233c2d0ec | |
parent | 24070b40926b42c35ca0649f44711cad5da0cf96 (diff) | |
download | linux-4d469d93a89ee0d9a77b5880b353f4c9dd6ef5e2.tar.xz |
tcp: clear tp->delivered in tcp_disconnect()
[ Upstream commit 2fbdd56251b5c62f96589f39eded277260de7267 ]
tp->delivered needs to be cleared in tcp_disconnect().
tcp_disconnect() is rarely used, but it is worth fixing it.
Fixes: ddf1af6fa00e ("tcp: new delivery accounting")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/ipv4/tcp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index e2ab94a563a9..704a1c6373b7 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2363,6 +2363,7 @@ int tcp_disconnect(struct sock *sk, int flags) tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp->snd_cwnd_cnt = 0; tp->window_clamp = 0; + tp->delivered = 0; tcp_set_ca_state(sk, TCP_CA_Open); tp->is_sack_reneg = 0; tcp_clear_retrans(tp); |