Skip to content

Commit 2c9e455

Browse files
committed
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: 78d9f48 ("netfilter: nf_tables: add devices to existing flowtable") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent b6d9014 commit 2c9e455

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
@@ -544,6 +544,7 @@ static int nft_trans_flowtable_add(struct nft_ctx *ctx, int msg_type,
544544
if (msg_type == NFT_MSG_NEWFLOWTABLE)
545545
nft_activate_next(ctx->net, flowtable);
546546

547+
INIT_LIST_HEAD(&nft_trans_flowtable_hooks(trans));
547548
nft_trans_flowtable(trans) = flowtable;
548549
nft_trans_commit_list_add_tail(ctx->net, trans);
549550

0 commit comments

Comments
 (0)