diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-07-19 20:19:43 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-27 08:47:02 +0200 |
| commit | dbe1a82d46edeb3e8f782be8af65ea74d4488cc3 (patch) | |
| tree | 8ef562ccc2e500ee2a394a88fc7e1b857c910eb1 | |
| parent | 706ce3c81b5c8e262a8bcf116ea689d0710c3a13 (diff) | |
| download | linux-dbe1a82d46edeb3e8f782be8af65ea74d4488cc3.tar.gz linux-dbe1a82d46edeb3e8f782be8af65ea74d4488cc3.tar.bz2 linux-dbe1a82d46edeb3e8f782be8af65ea74d4488cc3.zip | |
netfilter: nf_tables: skip bound chain in netns release path
[ Upstream commit 751d460ccff3137212f47d876221534bf0490996 ]
Skip bound chain from netns release path, the rule that owns this chain
releases these objects.
Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | net/netfilter/nf_tables_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index f04a69d74cb2..1cf075a4269a 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -10192,6 +10192,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table) ctx.family = table->family; ctx.table = table; list_for_each_entry(chain, &table->chains, list) { + if (nft_chain_is_bound(chain)) + continue; + ctx.chain = chain; list_for_each_entry_safe(rule, nr, &chain->rules, list) { list_del(&rule->list); |
