diff options
| author | Sven Eckelmann <sven@narfation.org> | 2026-06-26 18:10:45 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-04 13:39:38 +0200 |
| commit | f67314a2d4af1ce9e793c423bdec582b8fd605b4 (patch) | |
| tree | 3326f5b5694439a10141748799f5db3b035eef56 | |
| parent | 1381b021bf886b793fa5ffb895a8efae7ba0318f (diff) | |
| download | linux-stable-f67314a2d4af1ce9e793c423bdec582b8fd605b4.tar.gz linux-stable-f67314a2d4af1ce9e793c423bdec582b8fd605b4.zip | |
batman-adv: tp_meter: fix fast recovery precondition
commit 2b0d08f08ed3b2174f05c43089ec65f3543a025b upstream.
The fast recovery precondition checks if the recover (initialized to
BATADV_TP_FIRST_SEQ) is bigger than the received ack. But since recover is
only updated when this check is successful, it will never enter the fast
recovery mode.
According to RFC6582 Section 3.2 step 2, the check should actually be
different:
> When the third duplicate ACK is received, the TCP sender first
> checks the value of recover to see if the Cumulative
> Acknowledgment field covers more than recover
The precondition must therefore check if recover is smaller than the
received ack - basically swapping the operands of the current check.
Cc: stable@kernel.org
Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | net/batman-adv/tp_meter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index f961beac1228..1fc8d6e6f99b 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -733,7 +733,7 @@ static void batadv_tp_recv_ack(struct batadv_priv *bat_priv, if (atomic_read(&tp_vars->dup_acks) != 3) goto out; - if (recv_ack >= tp_vars->recover) + if (tp_vars->recover >= recv_ack) goto out; /* if this is the third duplicate ACK do Fast Retransmit */ |
