Skip to content

Commit 1db02f3

Browse files
ecsvgregkh
authored andcommitted
batman-adv: tp_meter: fix fast recovery precondition
commit 2b0d08f 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: 33a3bb4 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7d2a44b commit 1db02f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/batman-adv/tp_meter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ static void batadv_tp_recv_ack(struct batadv_priv *bat_priv,
733733
if (atomic_read(&tp_vars->dup_acks) != 3)
734734
goto out;
735735

736-
if (recv_ack >= tp_vars->recover)
736+
if (tp_vars->recover >= recv_ack)
737737
goto out;
738738

739739
/* if this is the third duplicate ACK do Fast Retransmit */

0 commit comments

Comments
 (0)