netfilter: nf_tables: set dormant flag on hook register failure
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: nf_tables: set dormant flag on hook register failure
We need to set the dormant flag again if we fail to register the hooks.
During memory pressure hook registration can fail and we end up with a table marked as active but no registered hooks.
On table/base chain deletion, nf_tables will attempt to unregister the hook again which yields a warn splat from the nftables core.
Reported-and-tested-by [email protected]
Fixes 179d9ba5559a ("netfilter: nf_tables: fix table flag updates")
Signed-off-by Florian Westphal <[email protected]>
--- net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+)
net/netfilter/nf_tables_api.c +1 -0
@@ -1251,6 +1251,7 @@ static int nf_tables_updtable(struct nft_ctx *ctx)return 0 ; err_register_hooks: + ctx->table->flags |=NFT_TABLE_F_DORMANT ;nft_trans_destroy (trans);return ret; }
Signature · 1 line
2.43.0