Commit 57542c05 authored by Eric Dumazet's avatar Eric Dumazet Committed by Greg Kroah-Hartman

tcp: clear tp->data_segs{in|out} in tcp_disconnect()

[ Upstream commit db7ffee6 ]

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: a44d6eac ("tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In")
Signed-off-by: default avatarEric 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: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d4bec3b
...@@ -2609,6 +2609,8 @@ int tcp_disconnect(struct sock *sk, int flags) ...@@ -2609,6 +2609,8 @@ int tcp_disconnect(struct sock *sk, int flags)
tp->bytes_acked = 0; tp->bytes_acked = 0;
tp->bytes_received = 0; tp->bytes_received = 0;
tp->bytes_retrans = 0; tp->bytes_retrans = 0;
tp->data_segs_in = 0;
tp->data_segs_out = 0;
tp->dsack_dups = 0; tp->dsack_dups = 0;
tp->reord_seen = 0; tp->reord_seen = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment