]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: flowtable: fix tcp and udp header checksum update
authorSven Auhagen <sven.auhagen@voleatech.de>
Tue, 2 Feb 2021 17:01:16 +0000 (18:01 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 4 Feb 2021 00:10:14 +0000 (01:10 +0100)
commita7236e36b8f6c628e79688ede3e556fe4e73a6b1
tree22c21a5f5aa879b960ed4f701e413f5642e0e7a1
parent815fac68e781c309c723a8a5820b9455b357f2b3
netfilter: flowtable: fix tcp and udp header checksum update

When updating the tcp or udp header checksum on port nat the function
inet_proto_csum_replace2 with the last parameter pseudohdr as true.
This leads to an error in the case that GRO is used and packets are
split up in GSO. The tcp or udp checksum of all packets is incorrect.

The error is probably masked due to the fact the most network driver
implement tcp/udp checksum offloading. It also only happens when GRO is
applied and not on single packets.

The error is most visible when using a pppoe connection which is not
triggering the tcp/udp checksum offload.

Fixes: d33443e2ecec ("netfilter: add generic flow table infrastructure")
Signed-off-by: Sven Auhagen <sven.auhagen@voleatech.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_core.c