mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
netfilter: nf_tables: disallow updates of anonymous sets
[ Upstream commitb770283c98] Disallow updates of set timeout and garbage collection parameters for anonymous sets. Fixes:123b99619c("netfilter: nf_tables: honor set timeout and garbage collection updates") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c34b220385
commit
abd3afddbf
@@ -4774,6 +4774,9 @@ static int nf_tables_newset(struct sk_buff *skb, const struct nfnl_info *info,
|
|||||||
if (info->nlh->nlmsg_flags & NLM_F_REPLACE)
|
if (info->nlh->nlmsg_flags & NLM_F_REPLACE)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
if (nft_set_is_anonymous(set))
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
err = nft_set_expr_alloc(&ctx, set, nla, exprs, &num_exprs, flags);
|
err = nft_set_expr_alloc(&ctx, set, nla, exprs, &num_exprs, flags);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user