diff options
author | Guishan Qin <guishan.qin@windriver.com> | 2020-12-11 17:35:11 +0800 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2021-01-25 17:04:56 +0800 |
commit | d97f11590a0f60cd911ace8bb68180b5a09a068d (patch) | |
tree | d0a26af268b2758793c5ec8eec0050771a9f591c /include/net | |
parent | 0dcf0c0aeefd2bc1023c9fe7ab0f1b6bc993c360 (diff) | |
download | qemu-d97f11590a0f60cd911ace8bb68180b5a09a068d.zip qemu-d97f11590a0f60cd911ace8bb68180b5a09a068d.tar.gz qemu-d97f11590a0f60cd911ace8bb68180b5a09a068d.tar.bz2 |
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: Guishan Qin <guishan.qin@windriver.com>
Signed-off-by: Yabing Liu <yabing.liu@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/net')
0 files changed, 0 insertions, 0 deletions