mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
netfilter: nft_bitwise: fix register tracking
[ Upstream commit14e8b29390] 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:34cc9e5288("netfilter: nf_tables: cancel tracking for clobbered destination registers") Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
81e11b6c1a
commit
1f26ea49a5
@@ -322,7 +322,7 @@ static bool nft_bitwise_reduce(struct nft_regs_track *track,
|
||||
dreg = priv->dreg;
|
||||
regcount = DIV_ROUND_UP(priv->len, NFT_REG32_SIZE);
|
||||
for (i = 0; i < regcount; i++, dreg++)
|
||||
track->regs[priv->dreg].bitwise = expr;
|
||||
track->regs[dreg].bitwise = expr;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user