Commit ab9da5c1 authored by Patrick McHardy's avatar Patrick McHardy Committed by Pablo Neira Ayuso

netfilter: nf_tables: restore notifications for anonymous set destruction

Since we have the context available again, we can restore notifications
for destruction of anonymous sets.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 62472bce
...@@ -2442,8 +2442,7 @@ static int nf_tables_newset(struct sock *nlsk, struct sk_buff *skb, ...@@ -2442,8 +2442,7 @@ static int nf_tables_newset(struct sock *nlsk, struct sk_buff *skb,
static void nf_tables_set_destroy(const struct nft_ctx *ctx, struct nft_set *set) static void nf_tables_set_destroy(const struct nft_ctx *ctx, struct nft_set *set)
{ {
list_del(&set->list); list_del(&set->list);
if (!(set->flags & NFT_SET_ANONYMOUS)) nf_tables_set_notify(ctx, set, NFT_MSG_DELSET);
nf_tables_set_notify(ctx, set, NFT_MSG_DELSET);
set->ops->destroy(set); set->ops->destroy(set);
module_put(set->ops->owner); module_put(set->ops->owner);
......
...@@ -94,7 +94,7 @@ static void nft_lookup_destroy(const struct nft_ctx *ctx, ...@@ -94,7 +94,7 @@ static void nft_lookup_destroy(const struct nft_ctx *ctx,
{ {
struct nft_lookup *priv = nft_expr_priv(expr); struct nft_lookup *priv = nft_expr_priv(expr);
nf_tables_unbind_set(NULL, priv->set, &priv->binding); nf_tables_unbind_set(ctx, priv->set, &priv->binding);
} }
static int nft_lookup_dump(struct sk_buff *skb, const struct nft_expr *expr) static int nft_lookup_dump(struct sk_buff *skb, const struct nft_expr *expr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment