Pārlūkot izejas kodu

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: Patrick McHardy <kaber@trash.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Patrick McHardy 11 gadi atpakaļ
vecāks
revīzija
ab9da5c19f
2 mainītis faili ar 2 papildinājumiem un 3 dzēšanām
  1. 1 2
      net/netfilter/nf_tables_api.c
  2. 1 1
      net/netfilter/nft_lookup.c

+ 1 - 2
net/netfilter/nf_tables_api.c

@@ -2442,8 +2442,7 @@ err1:
 static void nf_tables_set_destroy(const struct nft_ctx *ctx, struct nft_set *set)
 {
 	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);
 	module_put(set->ops->owner);

+ 1 - 1
net/netfilter/nft_lookup.c

@@ -94,7 +94,7 @@ static void nft_lookup_destroy(const struct nft_ctx *ctx,
 {
 	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)