mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 18:05:21 +02:00
netfilter: nf_tables: missing iterator type in lookup walk
commitefefd4f00c
upstream. Add missing decorator type to lookup expression and tighten WARN_ON_ONCE check in pipapo to spot earlier that this is unset. Fixes:29b359cf6d
("netfilter: nft_set_pipapo: walk over current view on netlink dump") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f24d8abc2b
commit
424bd79517
|
@ -217,6 +217,7 @@ static int nft_lookup_validate(const struct nft_ctx *ctx,
|
|||
return 0;
|
||||
|
||||
iter.genmask = nft_genmask_next(ctx->net);
|
||||
iter.type = NFT_ITER_UPDATE;
|
||||
iter.skip = 0;
|
||||
iter.count = 0;
|
||||
iter.err = 0;
|
||||
|
|
|
@ -2041,7 +2041,8 @@ static void nft_pipapo_walk(const struct nft_ctx *ctx, struct nft_set *set,
|
|||
const struct nft_pipapo_field *f;
|
||||
int i, r;
|
||||
|
||||
WARN_ON_ONCE(iter->type == NFT_ITER_UNSPEC);
|
||||
WARN_ON_ONCE(iter->type != NFT_ITER_READ &&
|
||||
iter->type != NFT_ITER_UPDATE);
|
||||
|
||||
rcu_read_lock();
|
||||
if (iter->type == NFT_ITER_READ)
|
||||
|
|
Loading…
Reference in New Issue
Block a user