[dpdk-dev] [PATCH v2] net: calculate checksums for packets with IPv4 options

Andrew Rybchenko arybchenko at solarflare.com
Mon Sep 7 09:48:10 CEST 2020


On 9/1/20 12:47 PM, Michael Pfeiffer wrote:
> 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 at tu-ilmenau.de>

Reviewed-by: Andrew Rybchenko <arybchenko at solarflare.com>


More information about the dev mailing list