netfilter: nf_tables: restore notifications for anonymous set destruction
authorPatrick McHardy <kaber@trash.net>
Fri, 7 Mar 2014 18:08:31 +0000 (19:08 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 8 Mar 2014 11:35:18 +0000 (12:35 +0100)
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>
net/netfilter/nf_tables_api.c
net/netfilter/nft_lookup.c

index 2c10c3fe78c3f0b3ce0532958880fd6a64d2e929..33045a56229769502532b38e7b4a1bc5d89c80d8 100644 (file)
@@ -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);
index 953978e8f0bac8a7a2b9fd40f758b2f2265b880a..7fd2bea8aa239f347dc461c7bc45869dac405573 100644 (file)
@@ -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)