Skip to content

Commit bccebf6

Browse files
Florian Westphalummakynes
authored andcommitted
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: 179d9ba ("netfilter: nf_tables: fix table flag updates") Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 40b9385 commit bccebf6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ static int nf_tables_updtable(struct nft_ctx *ctx)
12511251
return 0;
12521252

12531253
err_register_hooks:
1254+
ctx->table->flags |= NFT_TABLE_F_DORMANT;
12541255
nft_trans_destroy(trans);
12551256
return ret;
12561257
}

0 commit comments

Comments
 (0)