]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
batman-adv: Do not let TT changes list grows indefinitely
authorRemi Pommarel <repk@triplefau.lt>
Fri, 22 Nov 2024 15:52:50 +0000 (16:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:07:19 +0000 (18:07 +0100)
commita864e2e1ceda0a68116c66dff25687a46b5c25a8
tree76d667233c1567dd924b2cc896fd89980c0afb57
parentb0b2157b3c27445ebd16a23a77a01c86aaae26c7
batman-adv: Do not let TT changes list grows indefinitely

[ Upstream commit fff8f17c1a6fc802ca23bbd3a276abfde8cc58e6 ]

When TT changes list is too big to fit in packet due to MTU size, an
empty OGM is sent expected other node to send TT request to get the
changes. The issue is that tt.last_changeset was not built thus the
originator was responding with previous changes to those TT requests
(see batadv_send_my_tt_response). Also the changes list was never
cleaned up effectively never ending growing from this point onwards,
repeatedly sending the same TT response changes over and over, and
creating a new empty OGM every OGM interval expecting for the local
changes to be purged.

When there is more TT changes that can fit in packet, drop all changes,
send empty OGM and wait for TT request so we can respond with a full
table instead.

Fixes: e1bf0c14096f ("batman-adv: tvlv - convert tt data sent within OGMs")
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Acked-by: Antonio Quartulli <Antonio@mandelbit.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/batman-adv/translation-table.c