diff options
author | Eric Dumazet <edumazet@google.com> | 2020-01-31 10:22:47 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-01-31 22:12:18 -0800 |
commit | 2fbdd56251b5c62f96589f39eded277260de7267 (patch) | |
tree | 352754ca5805faf5afb55188cd8087601cb07596 /net | |
parent | c13c48c00a6bc1febc73902505bdec0967bd7095 (diff) |
tcp: clear tp->delivered in tcp_disconnect()
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>
Diffstat (limited to 'net')
-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 dd57f1e36181..a8ffdfb61f42 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2622,6 +2622,7 @@ int tcp_disconnect(struct sock *sk, int flags) tp->snd_cwnd = TCP_INIT_CWND; tp->snd_cwnd_cnt = 0; tp->window_clamp = 0; + tp->delivered = 0; tp->delivered_ce = 0; tcp_set_ca_state(sk, TCP_CA_Open); tp->is_sack_reneg = 0; |