summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_tables_api.c
diff options
context:
space:
mode:
authorPatrick McHardy2015-04-05 14:41:08 +0200
committerPablo Neira Ayuso2015-04-08 16:58:27 +0200
commit22fe54d5fefcfa98c58cc2f4607dd26d9648b3f5 (patch)
tree153c791a6efb2c0eb7aca4baecb84cb76199b706 /net/netfilter/nf_tables_api.c
parentnetfilter: nf_tables: support different set binding types (diff)
downloadkernel-qcow2-linux-22fe54d5fefcfa98c58cc2f4607dd26d9648b3f5.tar.gz
kernel-qcow2-linux-22fe54d5fefcfa98c58cc2f4607dd26d9648b3f5.tar.xz
kernel-qcow2-linux-22fe54d5fefcfa98c58cc2f4607dd26d9648b3f5.zip
netfilter: nf_tables: add support for dynamic set updates
Add a new "dynset" expression for dynamic set updates. A new set op ->update() is added which, for non existant elements, invokes an initialization callback and inserts the new element. For both new or existing elements the extenstion pointer is returned to the caller to optionally perform timer updates or other actions. Element removal is not supported so far, however that seems to be a rather exotic need and can be added later on. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_api.c')
-rw-r--r--net/netfilter/nf_tables_api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 90b898491da7..598e53eb64b3 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3183,11 +3183,11 @@ static struct nft_trans *nft_trans_elem_alloc(struct nft_ctx *ctx,
return trans;
}
-static void *nft_set_elem_init(const struct nft_set *set,
- const struct nft_set_ext_tmpl *tmpl,
- const struct nft_data *key,
- const struct nft_data *data,
- u64 timeout, gfp_t gfp)
+void *nft_set_elem_init(const struct nft_set *set,
+ const struct nft_set_ext_tmpl *tmpl,
+ const struct nft_data *key,
+ const struct nft_data *data,
+ u64 timeout, gfp_t gfp)
{
struct nft_set_ext *ext;
void *elem;