mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user