projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62e1e94
)
netfilter: nf_tables: disallow updates of anonymous sets
author
Pablo Neira Ayuso
<pablo@netfilter.org>
Fri, 16 Jun 2023 13:22:01 +0000
(15:22 +0200)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Tue, 20 Jun 2023 20:43:41 +0000
(22:43 +0200)
Disallow updates of set timeout and garbage collection parameters for
anonymous sets.
Fixes:
123b99619cca
("netfilter: nf_tables: honor set timeout and garbage collection updates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index
bab7924
..
16995b8
100644
(file)
--- a/
net/netfilter/nf_tables_api.c
+++ b/
net/netfilter/nf_tables_api.c
@@
-4963,6
+4963,9
@@
static int nf_tables_newset(struct sk_buff *skb, const struct nfnl_info *info,
if (info->nlh->nlmsg_flags & NLM_F_REPLACE)
return -EOPNOTSUPP;
+ if (nft_set_is_anonymous(set))
+ return -EOPNOTSUPP;
+
err = nft_set_expr_alloc(&ctx, set, nla, exprs, &num_exprs, flags);
if (err < 0)
return err;