6loWPAN: Yet another fix related to buffer offsets primarily.

This commit is contained in:
Gregory Nutt 2017-04-04 14:27:21 -06:00
parent fdf706a3a9
commit 34da085b40
2 changed files with 6 additions and 6 deletions

View File

@ -115,12 +115,12 @@ static void sixlowpan_compress_ipv6hdr(FAR struct ieee802154_driver_s *ieee,
{ {
/* Indicate the IPv6 dispatch and length */ /* Indicate the IPv6 dispatch and length */
*fptr = SIXLOWPAN_DISPATCH_IPV6; fptr[g_frame_hdrlen] = SIXLOWPAN_DISPATCH_IPV6;
g_frame_hdrlen += SIXLOWPAN_IPV6_HDR_LEN; g_frame_hdrlen += SIXLOWPAN_IPV6_HDR_LEN;
/* Copy the IPv6 header and adjust pointers */ /* Copy the IPv6 header and adjust pointers */
memcpy(fptr + g_frame_hdrlen, destip, IPv6_HDRLEN); memcpy(&fptr[g_frame_hdrlen] , destip, IPv6_HDRLEN);
g_frame_hdrlen += IPv6_HDRLEN; g_frame_hdrlen += IPv6_HDRLEN;
g_uncomp_hdrlen += IPv6_HDRLEN; g_uncomp_hdrlen += IPv6_HDRLEN;
} }