Merged in antmerlino/nuttx/sixlowpan_hc06_fix (pull request #644)
sixlowpan: Preserve big-endian (network order) when uncompressing address. This change is the counterpart to another recent endianness fix that occurred on compression of the ip address. Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
034ab467e6
commit
19ebdb4ef9
@ -499,9 +499,15 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
|
||||
|
||||
for (i = destndx; i < endndx; i++)
|
||||
{
|
||||
/* Big-endian, network order */
|
||||
#ifdef CONFIG_BIG_ENDIAN
|
||||
/* Preserve big-endian, network order */
|
||||
|
||||
ipaddr[i] = (uint16_t)srcptr[0] << 8 | (uint16_t)srcptr[1];
|
||||
#else
|
||||
/* Preserve big-endian, network order */
|
||||
|
||||
ipaddr[i] = (uint16_t)srcptr[1] << 8 | (uint16_t)srcptr[0];
|
||||
#endif
|
||||
srcptr += 2;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user