diff options
| author | Sven Eckelmann <sven@narfation.org> | 2026-06-26 18:11:19 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-04 13:41:30 +0200 |
| commit | d8d4bdc6756f977da77de5fda6981efab325d747 (patch) | |
| tree | 3645c8df71650da1ec0a6466cceb6a4dc9fc2a94 | |
| parent | d026ef8d0e127b985f369c01547f982cffad0b61 (diff) | |
| download | linux-stable-d8d4bdc6756f977da77de5fda6981efab325d747.tar.gz linux-stable-d8d4bdc6756f977da77de5fda6981efab325d747.zip | |
batman-adv: tt: don't merge change entries with different VIDs
commit f08e06c2d5c3e2434e7c773f2213f4a7dce6bc1e upstream.
batadv_tt_local_event() merges/cancels events for the same client which
would conflict or be duplicates. The matching of the queued events only
compares the MAC address - the VLAN ID stored in each event is ignored.
If a MAC would now appear on multiple VID, the two ADD change events (for
VID 1 and VID 2) would be merged to a single vid event. The remote can
therefore not calculate the correct TT table and desync. A full translation
table exchange is required to recover from this state.
A check of VID is therefore necessary to avoid such wrong merges/cancels.
Cc: stable@kernel.org
Fixes: c018ad3de61a ("batman-adv: add the VLAN ID attribute to the TT entry")
[ Context ]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | net/batman-adv/translation-table.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 53d2aadcafa1..c3d62df9e2b8 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -485,6 +485,9 @@ static void batadv_tt_local_event(struct batadv_priv *bat_priv, if (!batadv_compare_eth(entry->change.addr, common->addr)) continue; + if (entry->change.vid != tt_change_node->change.vid) + continue; + /* DEL+ADD in the same orig interval have no effect and can be * removed to avoid silly behaviour on the receiver side. The * other way around (ADD+DEL) can happen in case of roaming of |
