Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44a6f0df authored by Patrick McHardy's avatar Patrick McHardy Committed by Pablo Neira Ayuso
Browse files

netfilter: nf_tables: prohibit deletion of a table with existing sets



We currently leak the set memory when deleting a table that still has
sets in it. Return EBUSY when attempting to delete a table with sets.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 7047f9d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -467,7 +467,7 @@ static int nf_tables_deltable(struct sock *nlsk, struct sk_buff *skb,
	if (IS_ERR(table))
	if (IS_ERR(table))
		return PTR_ERR(table);
		return PTR_ERR(table);


	if (table->use)
	if (!list_empty(&table->chains) || !list_empty(&table->sets))
		return -EBUSY;
		return -EBUSY;


	list_del(&table->list);
	list_del(&table->list);