[dpdk-stable] [PATCH v2] vhost: fix IPv4 csum calculation
Ferruh Yigit
ferruh.yigit at intel.com
Thu Oct 24 19:40:27 CEST 2019
On 10/24/2019 5:29 PM, Flavio Leitner wrote:
> Currently the IPv4 header checksum is calculated including its
> current value, which can be a valid checksum or just garbage.
> In any case, if the original value is not zero, then the result
> is always wrong.
>
> The IPv4 checksum is defined in RFC791, page 14 says:
> Header Checksum: 16 bits
>
> The checksum algorithm is:
> The checksum field is the 16 bit one's complement of the one's
> complement sum of all 16 bit words in the header. For purposes of
> computing the checksum, the value of the checksum field is zero.
>
> Thus force the csum field to always be zero.
>
> Fixes: b08b8cfeb2ae ("vhost: fix IP checksum")
> Cc: stable at dpdk.org
>
> Signed-off-by: Flavio Leitner <fbl at sysclose.org>
Applied to dpdk-next-net/master, thanks.
More information about the stable
mailing list