From 003a37e37fb29b1c0062ee4de8e63928e7221eff Mon Sep 17 00:00:00 2001 From: Anthony Merlino Date: Mon, 20 Nov 2017 14:31:57 -0600 Subject: [PATCH] net/sixlowpan: Fix an endian-ness problem in 6LoWPAN address decompression. --- net/sixlowpan/sixlowpan_hc06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sixlowpan/sixlowpan_hc06.c b/net/sixlowpan/sixlowpan_hc06.c index b084f7e96b..688a449cc0 100644 --- a/net/sixlowpan/sixlowpan_hc06.c +++ b/net/sixlowpan/sixlowpan_hc06.c @@ -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; }