提交 4dc81529 编写于 作者: E Eric Dumazet 提交者: Yang Yingliang

tcp: clear tp->delivered in tcp_disconnect()

stable inclusion
from linux-4.19.103
commit 2d4bec3ba7af8f3529baf3262adfd65589cd93e8

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

[ Upstream commit 2fbdd562 ]

tp->delivered needs to be cleared in tcp_disconnect().

tcp_disconnect() is rarely used, but it is worth fixing it.

Fixes: ddf1af6f ("tcp: new delivery accounting")
Signed-off-by: NEric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: NYuchung Cheng <ycheng@google.com>
Acked-by: NNeal Cardwell <ncardwell@google.com>
Acked-by: NSoheil Hassas Yeganeh <soheil@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>
上级 673f3b0a
...@@ -2588,6 +2588,7 @@ int tcp_disconnect(struct sock *sk, int flags) ...@@ -2588,6 +2588,7 @@ int tcp_disconnect(struct sock *sk, int flags)
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
tp->snd_cwnd_cnt = 0; tp->snd_cwnd_cnt = 0;
tp->window_clamp = 0; tp->window_clamp = 0;
tp->delivered = 0;
tp->delivered_ce = 0; tp->delivered_ce = 0;
tcp_set_ca_state(sk, TCP_CA_Open); tcp_set_ca_state(sk, TCP_CA_Open);
tp->is_sack_reneg = 0; tp->is_sack_reneg = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册