Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b37507f authored by Yuchung Cheng's avatar Yuchung Cheng Committed by Greg Kroah-Hartman
Browse files

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: default avatarYuchung Cheng <ycheng@google.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 92b28268
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -336,7 +336,7 @@ static void tcp_probe_timer(struct sock *sk)
			return;
	}

	if (icsk->icsk_probes_out > max_probes) {
	if (icsk->icsk_probes_out >= max_probes) {
abort:		tcp_write_err(sk);
	} else {
		/* Only send another probe if we didn't close things up. */