]> www.infradead.org Git - users/jedix/linux-maple.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)
committerSimon Wunderlich <sw@simonwunderlich.de>
Thu, 5 Dec 2024 21:38:26 +0000 (22:38 +0100)
commitfff8f17c1a6fc802ca23bbd3a276abfde8cc58e6
tree3e02aae63ad60ec748343295f33a80f08772e2db
parent8038806db64da15721775d6b834990cacbfcf0b2
batman-adv: Do not let TT changes list grows indefinitely

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>
net/batman-adv/translation-table.c