mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
netfilter: nf_tables: always initialize flowtable hook list in transaction
The hook list is used if nft_trans_flowtable_update(trans) == true. However,
initialize this list for other cases for safety reasons.
Fixes: 78d9f48f7f
("netfilter: nf_tables: add devices to existing flowtable")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
b6d9014a33
commit
2c9e455977
@ -544,6 +544,7 @@ static int nft_trans_flowtable_add(struct nft_ctx *ctx, int msg_type,
|
||||
if (msg_type == NFT_MSG_NEWFLOWTABLE)
|
||||
nft_activate_next(ctx->net, flowtable);
|
||||
|
||||
INIT_LIST_HEAD(&nft_trans_flowtable_hooks(trans));
|
||||
nft_trans_flowtable(trans) = flowtable;
|
||||
nft_trans_commit_list_add_tail(ctx->net, trans);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user