提交 f2a40e44 编写于 作者: Y Yuchung Cheng 提交者: Xie XiuQi

tcp: fix off-by-one bug on aborting window-probing socket

[ Upstream commit 3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 ]

Previously there is an off-by-one bug on determining when to abort
a stalled window-probing socket. This patch fixes that so it is
consistent with tcp_write_timeout().
Signed-off-by: NYuchung Cheng <ycheng@google.com>
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NNeal Cardwell <ncardwell@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 8d7af1a6
...@@ -378,7 +378,7 @@ static void tcp_probe_timer(struct sock *sk) ...@@ -378,7 +378,7 @@ static void tcp_probe_timer(struct sock *sk)
return; return;
} }
if (icsk->icsk_probes_out > max_probes) { if (icsk->icsk_probes_out >= max_probes) {
abort: tcp_write_err(sk); abort: tcp_write_err(sk);
} else { } else {
/* Only send another probe if we didn't close things up. */ /* Only send another probe if we didn't close things up. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册