Skip to content

Commit 751d460

Browse files
ummakynesFlorian Westphal
authored andcommitted
netfilter: nf_tables: skip bound chain in netns release path
Skip bound chain from netns release path, the rule that owns this chain releases these objects. Fixes: d0e2c7d ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
1 parent 87b5a5c commit 751d460

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10802,6 +10802,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table)
1080210802
ctx.family = table->family;
1080310803
ctx.table = table;
1080410804
list_for_each_entry(chain, &table->chains, list) {
10805+
if (nft_chain_is_bound(chain))
10806+
continue;
10807+
1080510808
ctx.chain = chain;
1080610809
list_for_each_entry_safe(rule, nr, &chain->rules, list) {
1080710810
list_del(&rule->list);

0 commit comments

Comments
 (0)