Skip to content

Commit

Permalink
netfilter: nft_dynset: disallow object maps
Browse files Browse the repository at this point in the history
Do not allow to insert elements from datapath to objects maps.

Fixes: 8aeff92 ("netfilter: nf_tables: add stateful object reference to set elements")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
  • Loading branch information
Pablo Neira Ayuso authored and Florian Westphal committed Aug 15, 2023
1 parent 02c6c24 commit 23185c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/netfilter/nft_dynset.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
if (IS_ERR(set))
return PTR_ERR(set);

if (set->flags & NFT_SET_OBJECT)
return -EOPNOTSUPP;

if (set->ops->update == NULL)
return -EOPNOTSUPP;

Expand Down

0 comments on commit 23185c6

Please sign in to comment.