aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_dynset.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2025-07-09 19:05:14 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2025-07-25 18:40:23 +0200
commit531e61312104d991459af73c838396db26aa3550 (patch)
treeeb7183cff47eccfbd99810d51ac39b1ff1f25e6f /net/netfilter/nft_dynset.c
parentnetfilter: nft_set: remove one argument from lookup and update functions (diff)
downloadlinux-531e61312104d991459af73c838396db26aa3550.tar.gz
linux-531e61312104d991459af73c838396db26aa3550.zip
netfilter: nft_set: remove indirection from update API call
This stems from a time when sets and nft_dynset resided in different kernel modules. We can replace this with a direct call. We could even remove both ->update and ->delete, given its only supported by rhashtable, but on the off-chance we'll see runtime add/delete for other types or a new set type keep that as-is for now. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_dynset.c')
-rw-r--r--net/netfilter/nft_dynset.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/netfilter/nft_dynset.c b/net/netfilter/nft_dynset.c
index e24493d9e776..7807d8129664 100644
--- a/net/netfilter/nft_dynset.c
+++ b/net/netfilter/nft_dynset.c
@@ -44,9 +44,9 @@ static int nft_dynset_expr_setup(const struct nft_dynset *priv,
return 0;
}
-static struct nft_elem_priv *nft_dynset_new(struct nft_set *set,
- const struct nft_expr *expr,
- struct nft_regs *regs)
+struct nft_elem_priv *nft_dynset_new(struct nft_set *set,
+ const struct nft_expr *expr,
+ struct nft_regs *regs)
{
const struct nft_dynset *priv = nft_expr_priv(expr);
struct nft_set_ext *ext;
@@ -91,8 +91,7 @@ void nft_dynset_eval(const struct nft_expr *expr,
return;
}
- ext = set->ops->update(set, &regs->data[priv->sreg_key], nft_dynset_new,
- expr, regs);
+ ext = set->ops->update(set, &regs->data[priv->sreg_key], expr, regs);
if (ext) {
if (priv->op == NFT_DYNSET_OP_UPDATE &&
nft_set_ext_exists(ext, NFT_SET_EXT_TIMEOUT) &&