diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-10-14 21:34:32 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-14 20:28:05 -0700 |
commit | d25e2e9388eda61b6e298585024ee3355f50c493 (patch) | |
tree | 61f4d14910ab60337eed7e891f2ae4844b699db3 /net | |
parent | 50172733d01c3097b23ac8d45bf1fff72af0ba98 (diff) |
netfilter: restore NF_INET_NUMHOOKS
This definition is used by the iptables legacy UAPI, restore it.
Fixes: d3519cb89f6d ("netfilter: nf_tables: add inet ingress support")
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Tested-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index f22ad21d0230..7f1c184c00d2 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -1864,7 +1864,7 @@ static int nft_chain_parse_hook(struct net *net, if (IS_ERR(type)) return PTR_ERR(type); } - if (hook->num > NF_MAX_HOOKS || !(type->hook_mask & (1 << hook->num))) + if (hook->num >= NFT_MAX_HOOKS || !(type->hook_mask & (1 << hook->num))) return -EOPNOTSUPP; if (type->type == NFT_CHAIN_T_NAT && |