git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce77f03
)
net: fix IPv4 checksum
author
Hongzhi Guo
<guohongzhi1@huawei.com>
Tue, 26 May 2020 10:08:05 +0000
(18:08 +0800)
committer
Thomas Monjalon
<thomas@monjalon.net>
Wed, 24 Jun 2020 21:42:20 +0000
(23:42 +0200)
0xffff is invalid for IPv4 checksum (RFC1624)
Fixes:
6006818cfb26
("net: new checksum functions")
Cc: stable@dpdk.org
Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_net/rte_ip.h
patch
|
blob
|
history
diff --git
a/lib/librte_net/rte_ip.h
b/lib/librte_net/rte_ip.h
index
4c4437a
..
292f63f
100644
(file)
--- a/
lib/librte_net/rte_ip.h
+++ b/
lib/librte_net/rte_ip.h
@@
-267,7
+267,7
@@
rte_ipv4_cksum(const struct rte_ipv4_hdr *ipv4_hdr)
{
uint16_t cksum;
cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct rte_ipv4_hdr));
- return (
cksum == 0xffff) ? cksum : (
uint16_t)~cksum;
+ return (uint16_t)~cksum;
}
/**