net: checksum: Skip fragmented IP packets
commit0dcf0c0aeefd2bc1023c9fe7ab0f1b6bc993c360
authorMarkus Carlstedt <markus.carlstedt@windriver.com>
Fri, 11 Dec 2020 09:35:10 +0000 (11 17:35 +0800)
committerJason Wang <jasowang@redhat.com>
Mon, 25 Jan 2021 09:04:56 +0000 (25 17:04 +0800)
tree66afc6eb0f2fea9fd9c1404a026295b36a90af93
parent831734cce6494032e9233caff4d8442b3a1e7fef
net: checksum: Skip fragmented IP packets

To calculate the TCP/UDP checksum we need the whole datagram. Unless
the hardware has some logic to collect all fragments before sending
the whole datagram first, it can only be done by the network stack,
which is normally the case for the NICs we have seen so far.

Skip these fragmented IP packets to avoid checksum corruption.

Signed-off-by: Markus Carlstedt <markus.carlstedt@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/checksum.c