Skip to content

Commit ab9da5c

Browse files
kaberummakynes
authored andcommitted
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>
1 parent 62472bc commit ab9da5c

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎net/netfilter/nf_tables_api.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,8 +2442,7 @@ static int nf_tables_newset(struct sock *nlsk, struct sk_buff *skb,
24422442
static void nf_tables_set_destroy(const struct nft_ctx *ctx, struct nft_set *set)
24432443
{
24442444
list_del(&set->list);
2445-
if (!(set->flags & NFT_SET_ANONYMOUS))
2446-
nf_tables_set_notify(ctx, set, NFT_MSG_DELSET);
2445+
nf_tables_set_notify(ctx, set, NFT_MSG_DELSET);
24472446

24482447
set->ops->destroy(set);
24492448
module_put(set->ops->owner);

‎net/netfilter/nft_lookup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static void nft_lookup_destroy(const struct nft_ctx *ctx,
9494
{
9595
struct nft_lookup *priv = nft_expr_priv(expr);
9696

97-
nf_tables_unbind_set(NULL, priv->set, &priv->binding);
97+
nf_tables_unbind_set(ctx, priv->set, &priv->binding);
9898
}
9999

100100
static int nft_lookup_dump(struct sk_buff *skb, const struct nft_expr *expr)

0 commit comments

Comments
 (0)