]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
batman-adv: mcast/TT: fix wrongly dropped or rerouted packets
authorLinus Lüssing <linus.luessing@c0d3.blue>
Fri, 4 Sep 2020 18:28:00 +0000 (20:28 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:47:59 +0000 (14:47 +0100)
commitc99f97e41c755df54923a04ea1d6f35cd1b3e54b
treeba19e3ab48d75d056577eea58a2451eb75871314
parentffadec47cfb112c994712f396f4c2f2c1030b0b1
batman-adv: mcast/TT: fix wrongly dropped or rerouted packets

BugLink: https://bugs.launchpad.net/bugs/1900624
[ Upstream commit 7dda5b3384121181c4e79f6eaeac2b94c0622c8d ]

The unicast packet rerouting code makes several assumptions. For
instance it assumes that there is always exactly one destination in the
TT. This breaks for multicast frames in a unicast packets in several ways:

For one thing if there is actually no TT entry and the destination node
was selected due to the multicast tvlv flags it announced. Then an
intermediate node will wrongly drop the packet.

For another thing if there is a TT entry but the TTVN of this entry is
newer than the originally addressed destination node: Then the
intermediate node will wrongly redirect the packet, leading to
duplicated multicast packets at a multicast listener and missing
packets at other multicast listeners or multicast routers.

Fixing this by not applying the unicast packet rerouting to batman-adv
unicast packets with a multicast payload. We are not able to detect a
roaming multicast listener at the moment and will just continue to send
the multicast frame to both the new and old destination for a while in
case of such a roaming multicast listener.

Fixes: a73105b8d4c7 ("batman-adv: improved client announcement mechanism")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
net/batman-adv/routing.c