6loWPAN: Fix a missing source address in header. Correct calculation of payload size.

This commit is contained in:
Gregory Nutt
2017-04-19 13:33:20 -06:00
parent d3e1ea84f6
commit 50fda0d748
7 changed files with 51 additions and 39 deletions

View File

@@ -167,7 +167,7 @@ int sixlowpan_recv_hdrlen(FAR const uint8_t *fptr)
}
else if (addrmode == FRAME802154_LONGADDRMODE)
{
/* 2 byte dest PAN + 6 byte dest long address */
/* 2 byte dest PAN + 8 byte dest long address */
hdrlen += 10;
}
@@ -193,6 +193,8 @@ int sixlowpan_recv_hdrlen(FAR const uint8_t *fptr)
}
else
{
/* Add source PANID if PANIDs are not compressed */
if ((fptr[0] & (1 << FRAME802154_PANIDCOMP_SHIFT)) == 0)
{
hdrlen += 2;