Michael Pfeiffer ac0ad5eff8 net: calculate checksum of packet with IPv4 options
Currently, rte_ipv4_cksum() and rte_ipv4_udptcp_cksum() assume all IPv4
headers have sizeof(struct rte_ipv4_hdr) bytes. This is not true for
those (rare) packets with IPv4 options. Thus, both IPv4 and TCP/UDP
checksums are calculated wrong.

This patch fixes the issue by using the actual IPv4 header length from
the packet's IHL field.

Signed-off-by: Michael Pfeiffer <michael.pfeiffer@tu-ilmenau.de>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2020-10-06 17:10:02 +02:00
..
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-09-10 21:53:48 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-07-21 17:36:54 +02:00
2019-10-25 19:00:22 +02:00
2020-08-12 11:32:16 +02:00
2020-09-18 18:55:12 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00
2020-04-16 18:16:46 +02:00