[dpdk-users] Bug in IPv4 header checksum computation?

N. Benes nbenes at eso.org
Fri Mar 22 10:30:00 CET 2019


N. Benes:
> Example to generate a PCAP with 0x0000 IPv4 header checksum and
> (correct) UDP payload with 0 checksum:
> 
> text2pcap -n -e 0800 ipcks.txt ipcks.pcapng
>> 0000 45 00 00 20 12 34 00 00   10 11 00 00 0a 00 00 01
>> 0010 0a 00 00 02 01 00 00 16   00 0c 00 00 00 00 00 00

As an improvement to the above example, here's a valid IPv4/UDP packet
with IPv4 header checksum resulting in 0x0000 (IPv4 identification
chosen accordingly):

> 0000 45 00 00 20 96 cb 00 00   10 11 00 00 0a 00 00 01
> 0010 0a 00 00 02 01 00 00 16   00 0c 00 00 00 00 00 00

This packet is shown as fully correct in Wireshark, but DPDK's
rte_ipv4_cksum() would set the checksum to 0xffff.


More information about the users mailing list