Skip to content

Commit 23185c6

Browse files
ummakynesFlorian Westphal
authored andcommitted
netfilter: nft_dynset: disallow object maps
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>
1 parent 02c6c24 commit 23185c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nft_dynset.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ static int nft_dynset_init(const struct nft_ctx *ctx,
191191
if (IS_ERR(set))
192192
return PTR_ERR(set);
193193

194+
if (set->flags & NFT_SET_OBJECT)
195+
return -EOPNOTSUPP;
196+
194197
if (set->ops->update == NULL)
195198
return -EOPNOTSUPP;
196199

0 commit comments

Comments
 (0)