Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next

Florian Westphal says:

====================
netfilter fix for net-next

This is a late bug fix for the *net-next* tree to make nftables
"fib" expression play nice with VRF devices.

This was broken since day 1 (v4.10) so I don't see a compelling reason
to push this via net at the last minute.

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next:
netfilter: nft_fib: Fix for rpath check with VRF devices
====================

Link: https://lore.kernel.org/r/20220928113908.4525-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+8 -1
+3
net/ipv4/netfilter/nft_fib_ipv4.c
··· 83 83 else 84 84 oif = NULL; 85 85 86 + if (priv->flags & NFTA_FIB_F_IIF) 87 + fl4.flowi4_oif = l3mdev_master_ifindex_rcu(oif); 88 + 86 89 if (nft_hook(pkt) == NF_INET_PRE_ROUTING && 87 90 nft_fib_is_loopback(pkt->skb, nft_in(pkt))) { 88 91 nft_fib_store_result(dest, priv, nft_in(pkt));
+5 -1
net/ipv6/netfilter/nft_fib_ipv6.c
··· 41 41 if (ipv6_addr_type(&fl6->daddr) & IPV6_ADDR_LINKLOCAL) { 42 42 lookup_flags |= RT6_LOOKUP_F_IFACE; 43 43 fl6->flowi6_oif = get_ifindex(dev ? dev : pkt->skb->dev); 44 + } else if ((priv->flags & NFTA_FIB_F_IIF) && 45 + (netif_is_l3_master(dev) || netif_is_l3_slave(dev))) { 46 + fl6->flowi6_oif = dev->ifindex; 44 47 } 45 48 46 49 if (ipv6_addr_type(&fl6->saddr) & IPV6_ADDR_UNICAST) ··· 200 197 if (rt->rt6i_flags & (RTF_REJECT | RTF_ANYCAST | RTF_LOCAL)) 201 198 goto put_rt_err; 202 199 203 - if (oif && oif != rt->rt6i_idev->dev) 200 + if (oif && oif != rt->rt6i_idev->dev && 201 + l3mdev_master_ifindex_rcu(rt->rt6i_idev->dev) != oif->ifindex) 204 202 goto put_rt_err; 205 203 206 204 nft_fib_store_result(dest, priv, rt->rt6i_idev->dev);