net/icmp: fix icmp checksum bug
Build Documentation / build-html (push) Has been cancelled

Use the new cheksum interface to avoid checksum errors caused by IoB discontinuity

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
gaohedong
2025-09-16 22:12:09 +08:00
committed by Xiang Xiao
parent 267df3a120
commit 07372c12ec
+1 -2
View File
@@ -291,8 +291,7 @@ void icmp_input(FAR struct net_driver_s *dev)
icmp = IPBUF(iphdrlen);
#ifdef CONFIG_NET_ICMP_CHECKSUMS
csum = icmp_chksum(dev,
((ipv4->len[0] << 8) | ipv4->len[1]) - iphdrlen);
csum = icmp_chksum_iob(dev->d_iob);
if (csum != 0xffff)
{
ninfo("ICMP checksum error\n");