diff options
author | Phil Sutter <phil@nwl.cc> | 2022-10-05 18:07:05 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2022-10-12 14:08:15 +0200 |
commit | acc641ab95b66b813c1ce856c377a2bbe71e7f52 (patch) | |
tree | 4add7238511a0af8eea9fe77892887b0cb0bb2a0 /net/ipv6/netfilter/nft_fib_ipv6.c | |
parent | 6e31ce831c63bd7aec8ff9cc2a6d50ee8c4d4e04 (diff) | |
download | linux-acc641ab95b66b813c1ce856c377a2bbe71e7f52.tar.bz2 |
netfilter: rpfilter/fib: Populate flowic_l3mdev field
Use the introduced field for correct operation with VRF devices instead
of conditionally overwriting flowic_oif. This is a partial revert of
commit b575b24b8eee3 ("netfilter: Fix rpfilter dropping vrf packets by
mistake"), implementing a simpler solution.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'net/ipv6/netfilter/nft_fib_ipv6.c')
-rw-r--r-- | net/ipv6/netfilter/nft_fib_ipv6.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/nft_fib_ipv6.c b/net/ipv6/netfilter/nft_fib_ipv6.c index 1d7e520d9966..91faac610e03 100644 --- a/net/ipv6/netfilter/nft_fib_ipv6.c +++ b/net/ipv6/netfilter/nft_fib_ipv6.c @@ -41,9 +41,8 @@ static int nft_fib6_flowi_init(struct flowi6 *fl6, const struct nft_fib *priv, if (ipv6_addr_type(&fl6->daddr) & IPV6_ADDR_LINKLOCAL) { lookup_flags |= RT6_LOOKUP_F_IFACE; fl6->flowi6_oif = get_ifindex(dev ? dev : pkt->skb->dev); - } else if ((priv->flags & NFTA_FIB_F_IIF) && - (netif_is_l3_master(dev) || netif_is_l3_slave(dev))) { - fl6->flowi6_oif = dev->ifindex; + } else if (priv->flags & NFTA_FIB_F_IIF) { + fl6->flowi6_l3mdev = l3mdev_master_ifindex_rcu(dev); } if (ipv6_addr_type(&fl6->saddr) & IPV6_ADDR_UNICAST) |