Skip to content

Commit e8ded22

Browse files
erig0ummakynes
authored andcommitted
netfilter: nft_fib: allow from forward/input without iif selector
This removes the restriction of needing iif selector in the forward/input hooks for fib lookups when requested result is oif/oifname. Removing this restriction allows "loose" lookups from the forward hooks. Fixes: be8be04 ("netfilter: nft_fib: reverse path filter for policy-based routing on iif") Signed-off-by: Eric Garver <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 21a673b commit e8ded22

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/netfilter/nft_fib.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ int nft_fib_validate(const struct nft_ctx *ctx, const struct nft_expr *expr,
3535
switch (priv->result) {
3636
case NFT_FIB_RESULT_OIF:
3737
case NFT_FIB_RESULT_OIFNAME:
38-
hooks = (1 << NF_INET_PRE_ROUTING);
39-
if (priv->flags & NFTA_FIB_F_IIF) {
40-
hooks |= (1 << NF_INET_LOCAL_IN) |
41-
(1 << NF_INET_FORWARD);
42-
}
38+
hooks = (1 << NF_INET_PRE_ROUTING) |
39+
(1 << NF_INET_LOCAL_IN) |
40+
(1 << NF_INET_FORWARD);
4341
break;
4442
case NFT_FIB_RESULT_ADDRTYPE:
4543
if (priv->flags & NFTA_FIB_F_IIF)

0 commit comments

Comments
 (0)