Skip to content

Commit a7dc71e

Browse files
ummakynespull[bot]
authored andcommitted
netfilter: nf_tables: set last expression in register tracking area
nft_rule_for_each_expr() sets on last to nft_rule_last(), however, this is coming after track.last field is set on. Use nft_expr_last() to set track.last accordingly. Fixes: 12e4ecf ("netfilter: nf_tables: add register tracking infrastructure") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent a740bab commit a7dc71e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8299,7 +8299,7 @@ static int nf_tables_commit_chain_prepare(struct net *net, struct nft_chain *cha
82998299
return -ENOMEM;
83008300

83018301
size = 0;
8302-
track.last = last;
8302+
track.last = nft_expr_last(rule);
83038303
nft_rule_for_each_expr(expr, last, rule) {
83048304
track.cur = expr;
83058305

0 commit comments

Comments
 (0)