提交 7e93aeac 编写于 作者: E Eric Dumazet 提交者: Yang Yingliang

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

stable inclusion
from linux-4.19.103
commit 57542c0555f0fa0ae11f728054a50ee65fa073cf

--------------------------------

[ 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: NEric 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: NNeal Cardwell <ncardwell@google.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NLi Aichun <liaichun@huawei.com>
Reviewed-by: Nguodeqing <geffrey.guo@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4dc81529
...@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册