mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
netfilter: nft_fib: Fix for rpath check with VRF devices
Analogous to commitb575b24b8e("netfilter: Fix rpfilter dropping vrf packets by mistake") but for nftables fib expression: Add special treatment of VRF devices so that typical reverse path filtering via 'fib saddr . iif oif' expression works as expected. Fixes:f6d0cbcf09("netfilter: nf_tables: add fib expression") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
committed by
Florian Westphal
parent
b9a5cbf8ba
commit
2a8a7c0eaa
@@ -83,6 +83,9 @@ void nft_fib4_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
||||
else
|
||||
oif = NULL;
|
||||
|
||||
if (priv->flags & NFTA_FIB_F_IIF)
|
||||
fl4.flowi4_oif = l3mdev_master_ifindex_rcu(oif);
|
||||
|
||||
if (nft_hook(pkt) == NF_INET_PRE_ROUTING &&
|
||||
nft_fib_is_loopback(pkt->skb, nft_in(pkt))) {
|
||||
nft_fib_store_result(dest, priv, nft_in(pkt));
|
||||
|
||||
Reference in New Issue
Block a user