summaryrefslogtreecommitdiffstats
path: root/include/net/netfilter
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2018-06-02 23:38:50 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-06-03 00:02:11 +0200
commit371ebcbb9ee62fb46a0a27f358941588f7048678 (patch)
tree6ab7121e5735fbd75a2667385b66bd460d4dede6 /include/net/netfilter
parent79b174ade16d90302aef6e14f5eefd0b723c1602 (diff)
downloadlinux-371ebcbb9ee62fb46a0a27f358941588f7048678.tar.gz
linux-371ebcbb9ee62fb46a0a27f358941588f7048678.tar.bz2
linux-371ebcbb9ee62fb46a0a27f358941588f7048678.zip
netfilter: nf_tables: add destroy_clone expression
Before this patch, cloned expressions are released via ->destroy. This is a problem for the new connlimit expression since the ->destroy path drop a reference on the conntrack modules and it unregisters hooks. The new ->destroy_clone provides context that this expression is being released from the packet path, so it is mirroring ->clone(), where neither module reference is dropped nor hooks need to be unregistered - because this done from the control plane path from the ->init() path. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter')
-rw-r--r--include/net/netfilter/nf_tables.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 871cb3b012e9..83e7b83ecf3e 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -745,6 +745,8 @@ struct nft_expr_ops {
const struct nft_expr *expr);
void (*destroy)(const struct nft_ctx *ctx,
const struct nft_expr *expr);
+ void (*destroy_clone)(const struct nft_ctx *ctx,
+ const struct nft_expr *expr);
int (*dump)(struct sk_buff *skb,
const struct nft_expr *expr);
int (*validate)(const struct nft_ctx *ctx,