mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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: d0e2c7de92
("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
87b5a5c209
commit
751d460ccf
1 changed files with 3 additions and 0 deletions
|
@ -10802,6 +10802,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table)
|
||||||
ctx.family = table->family;
|
ctx.family = table->family;
|
||||||
ctx.table = table;
|
ctx.table = table;
|
||||||
list_for_each_entry(chain, &table->chains, list) {
|
list_for_each_entry(chain, &table->chains, list) {
|
||||||
|
if (nft_chain_is_bound(chain))
|
||||||
|
continue;
|
||||||
|
|
||||||
ctx.chain = chain;
|
ctx.chain = chain;
|
||||||
list_for_each_entry_safe(rule, nr, &chain->rules, list) {
|
list_for_each_entry_safe(rule, nr, &chain->rules, list) {
|
||||||
list_del(&rule->list);
|
list_del(&rule->list);
|
||||||
|
|
Loading…
Reference in a new issue