Skip to content

Commit

Permalink
tcp: fix off-by-one bug on aborting window-probing socket
Browse files Browse the repository at this point in the history
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: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yuchung Cheng authored and David S. Miller committed Dec 1, 2018
1 parent c0f5377 commit 3976535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,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. */
Expand Down

0 comments on commit 3976535

Please sign in to comment.