netfilter: flowtable: really fix NAT IPv6 offload
authorQingfang DENG <dqfext@gmail.com>
Thu, 8 Dec 2022 12:35:29 +0000 (20:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:36 +0000 (13:14 +0100)
commit74248b556006b38727ab517d8dfdde4f3f004c97
tree9716cede71b56c84ad993553b00df28691095968
parent5c940632cabfa2a1ab633759c9ed2abd75871894
netfilter: flowtable: really fix NAT IPv6 offload

[ Upstream commit 5fb45f95eec682621748b7cb012c6a8f0f981e6a ]

The for-loop was broken from the start. It translates to:

for (i = 0; i < 4; i += 4)

which means the loop statement is run only once, so only the highest
32-bit of the IPv6 address gets mangled.

Fix the loop increment.

Fixes: 0e07e25b481a ("netfilter: flowtable: fix NAT IPv6 offload mangling")
Fixes: 5c27d8d76ce8 ("netfilter: nf_flow_table_offload: add IPv6 support")
Signed-off-by: Qingfang DENG <dqfext@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_flow_table_offload.c