diff options
author | Eric Dumazet <edumazet@google.com> | 2020-01-31 10:32:41 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-11 04:33:53 -0800 |
commit | 57542c0555f0fa0ae11f728054a50ee65fa073cf (patch) | |
tree | 116472473f2cf21eaca1f250780f628e18fefb95 | |
parent | 2d4bec3ba7af8f3529baf3262adfd65589cd93e8 (diff) | |
download | linux-stable-57542c0555f0fa0ae11f728054a50ee65fa073cf.tar.gz linux-stable-57542c0555f0fa0ae11f728054a50ee65fa073cf.tar.bz2 linux-stable-57542c0555f0fa0ae11f728054a50ee65fa073cf.zip |
tcp: clear tp->data_segs{in|out} in tcp_disconnect()
[ Upstream commit db7ffee6f3eb3683cdcaeddecc0a630a14546fe3 ]
tp->data_segs_in and tp->data_segs_out need to be cleared
in tcp_disconnect().
tcp_disconnect() is rarely used, but it is worth fixing it.
Fixes: a44d6eacdaf5 ("tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index eb99e91d492d..3c6664a74f89 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2609,6 +2609,8 @@ int tcp_disconnect(struct sock *sk, int flags) tp->bytes_acked = 0; tp->bytes_received = 0; tp->bytes_retrans = 0; + tp->data_segs_in = 0; + tp->data_segs_out = 0; tp->dsack_dups = 0; tp->reord_seen = 0; |