Skip to content

Commit 14e8b29

Browse files
a3a3elummakynes
authored andcommitted
netfilter: nft_bitwise: fix register tracking
At the end of `nft_bitwise_reduce`, there is a loop which is intended to update the bitwise expression associated with each tracked destination register. However, currently, it just updates the first register repeatedly. Fix it. Fixes: 34cc9e5 ("netfilter: nf_tables: cancel tracking for clobbered destination registers") Signed-off-by: Jeremy Sowden <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent bd05876 commit 14e8b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nft_bitwise.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static bool nft_bitwise_reduce(struct nft_regs_track *track,
323323
dreg = priv->dreg;
324324
regcount = DIV_ROUND_UP(priv->len, NFT_REG32_SIZE);
325325
for (i = 0; i < regcount; i++, dreg++)
326-
track->regs[priv->dreg].bitwise = expr;
326+
track->regs[dreg].bitwise = expr;
327327

328328
return false;
329329
}

0 commit comments

Comments
 (0)