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:50:46 +0200 |
commit | ec3e856075c54a04df13c6c862dc0bff9722917a (patch) | |
tree | fa5106af1bd08ddadbda2407c3028014a1d3a467 | |
parent | 90c3955beb858bb52a9e5c4380ed0e520e3730d1 (diff) | |
download | linux-stable-ec3e856075c54a04df13c6c862dc0bff9722917a.tar.gz linux-stable-ec3e856075c54a04df13c6c862dc0bff9722917a.tar.bz2 linux-stable-ec3e856075c54a04df13c6c862dc0bff9722917a.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 0bb1cc7ed5e9..f621c5e48747 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -10398,6 +10398,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); |