diff options
Diffstat (limited to 'nuttx/net/uip/uip-icmpsend.c')
-rw-r--r-- | nuttx/net/uip/uip-icmpsend.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nuttx/net/uip/uip-icmpsend.c b/nuttx/net/uip/uip-icmpsend.c index 90c2a6c6e..c0076b0e8 100644 --- a/nuttx/net/uip/uip-icmpsend.c +++ b/nuttx/net/uip/uip-icmpsend.c @@ -98,6 +98,12 @@ void uip_icmpsend(struct uip_driver_s *dev, uip_ipaddr_t *destaddr) dev->d_len = dev->d_sndlen + UIP_IPICMPH_LEN; + /* The total size of the data (for ICMP checksum calculation) includes + * the size of the ICMP header + */ + + dev->d_sndlen += UIP_ICMPH_LEN; + /* Initialize the IP header. Note that for IPv6, the IP length field * does not include the IPv6 IP header length. */ |