Patch "net: vrf: determine the dst using the original ifindex for multicast" has been added to the 6.0-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

    net: vrf: determine the dst using the original ifindex for multicast

to the 6.0-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:
     net-vrf-determine-the-dst-using-the-original-ifindex.patch
and it can be found in the queue-6.0 subdirectory.

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



commit af0fc9f37f7445b5ea529dcf59bed4b429975ece
Author: Antoine Tenart <atenart@xxxxxxxxxx>
Date:   Tue Dec 20 18:18:25 2022 +0100

    net: vrf: determine the dst using the original ifindex for multicast
    
    [ Upstream commit f2575c8f404911da83f25b688e12afcf4273e640 ]
    
    Multicast packets received on an interface bound to a VRF are marked as
    belonging to the VRF and the skb device is updated to point to the VRF
    device itself. This was fine even when a route was associated to a
    device as when performing a fib table lookup 'oif' in fib6_table_lookup
    (coming from 'skb->dev->ifindex' in ip6_route_input) was set to 0 when
    FLOWI_FLAG_SKIP_NH_OIF was set.
    
    With commit 40867d74c374 ("net: Add l3mdev index to flow struct and
    avoid oif reset for port devices") this is not longer true and multicast
    traffic is not received on the original interface.
    
    Instead of adding back a similar check in fib6_table_lookup determine
    the dst using the original ifindex for multicast VRF traffic. To make
    things consistent across the function do the above for all strict
    packets, which was the logic before commit 6f12fa775530 ("vrf: mark skb
    for multicast or link-local as enslaved to VRF"). Note that reverting to
    this behavior should be fine as the change was about marking packets
    belonging to the VRF, not about their dst.
    
    Fixes: 40867d74c374 ("net: Add l3mdev index to flow struct and avoid oif reset for port devices")
    Reported-by: Jianlin Shi <jishi@xxxxxxxxxx>
    Signed-off-by: Antoine Tenart <atenart@xxxxxxxxxx>
    Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221220171825.1172237-1-atenart@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 5df7a0abc39d..f7f40e3fe9cc 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1385,8 +1385,8 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev,
 
 	/* loopback, multicast & non-ND link-local traffic; do not push through
 	 * packet taps again. Reset pkt_type for upper layers to process skb.
-	 * For strict packets with a source LLA, determine the dst using the
-	 * original ifindex.
+	 * For non-loopback strict packets, determine the dst using the original
+	 * ifindex.
 	 */
 	if (skb->pkt_type == PACKET_LOOPBACK || (need_strict && !is_ndisc)) {
 		skb->dev = vrf_dev;
@@ -1395,7 +1395,7 @@ static struct sk_buff *vrf_ip6_rcv(struct net_device *vrf_dev,
 
 		if (skb->pkt_type == PACKET_LOOPBACK)
 			skb->pkt_type = PACKET_HOST;
-		else if (ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL)
+		else
 			vrf_ip6_input_dst(skb, vrf_dev, orig_iif);
 
 		goto out;



[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