net/sixlowpan: Fix an endian-ness problem in 6LoWPAN address decompression.

This commit is contained in:
Anthony Merlino 2017-11-20 14:31:57 -06:00 committed by Gregory Nutt
parent 1fba8ba145
commit 003a37e37f

View File

@ -490,7 +490,7 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
{
/* Big-endian, network order */
ipaddr[i] = (uint16_t)srcptr[0] << 8 | (uint16_t)srcptr[1];
ipaddr[i] = (uint16_t)srcptr[1] << 8 | (uint16_t)srcptr[0];
srcptr += 2;
}