Skip to content
Snippets Groups Projects
Commit d97f1159 authored by Guishan Qin's avatar Guishan Qin Committed by Jason Wang
Browse files

net: checksum: Add IP header checksum calculation


At present net_checksum_calculate() only calculates TCP/UDP checksum
in an IP packet, but assumes the IP header checksum to be provided
by the software, e.g.: Linux kernel always calculates the IP header
checksum. However this might not always be the case, e.g.: for an IP
checksum offload enabled stack like VxWorks, the IP header checksum
can be zero.

This adds the checksum calculation of the IP header.

Signed-off-by: default avatarGuishan Qin <guishan.qin@windriver.com>
Signed-off-by: default avatarYabing Liu <yabing.liu@windriver.com>
Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
parent 0dcf0c0a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment