Patch "batman-adv: mcast/TT: fix wrongly dropped or rerouted packets" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    batman-adv: mcast/TT: fix wrongly dropped or rerouted packets

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     batman-adv-mcast-tt-fix-wrongly-dropped-or-rerouted-.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 477dcef51262b3bfe0a330767bcf184ff33a5d96
Author: Linus Lüssing <linus.luessing@xxxxxxxxx>
Date:   Fri Sep 4 20:28:00 2020 +0200

    batman-adv: mcast/TT: fix wrongly dropped or rerouted packets
    
    [ 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@xxxxxxxxx>
    Signed-off-by: Sven Eckelmann <sven@xxxxxxxxxxxxx>
    Signed-off-by: Simon Wunderlich <sw@xxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 19059ae26e519..1ba205c3ea9fa 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -803,6 +803,10 @@ static bool batadv_check_unicast_ttvn(struct batadv_priv *bat_priv,
 	vid = batadv_get_vid(skb, hdr_len);
 	ethhdr = (struct ethhdr *)(skb->data + hdr_len);
 
+	/* do not reroute multicast frames in a unicast header */
+	if (is_multicast_ether_addr(ethhdr->h_dest))
+		return true;
+
 	/* check if the destination client was served by this node and it is now
 	 * roaming. In this case, it means that the node has got a ROAM_ADV
 	 * message and that it knows the new destination in the mesh to re-route



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux