Skip to content

Commit

Permalink
netfilter: nf_tables: restore notifications for anonymous set destruc…
Browse files Browse the repository at this point in the history
…tion

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>
  • Loading branch information
Patrick McHardy authored and Pablo Neira Ayuso committed Mar 8, 2014
1 parent 62472bc commit ab9da5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions net/netfilter/nf_tables_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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);
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nft_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ab9da5c

Please sign in to comment.