diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-08-15 15:39:02 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-08-16 00:05:15 +0200 |
commit | 23185c6aed1ffb8fc44087880ba2767aba493779 (patch) | |
tree | 33b6ba6edb8743db8f9f1a5fb7d5265ec295dfd6 /net/netfilter | |
parent | 02c6c24402bf1c1e986899c14ba22a10b510916b (diff) | |
download | linux-23185c6aed1ffb8fc44087880ba2767aba493779.tar.gz linux-23185c6aed1ffb8fc44087880ba2767aba493779.tar.bz2 linux-23185c6aed1ffb8fc44087880ba2767aba493779.zip |
netfilter: nft_dynset: disallow object maps
Do not allow to insert elements from datapath to objects maps.
Fixes: 8aeff920dcc9 ("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>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nft_dynset.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c index 4fb34d76dbea..5c5cc01c73c5 100644 --- a/net/netfilter/nft_dynset.c +++ b/net/netfilter/nft_dynset.c @@ -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; |