From e8832be8f1443b7bfda72bfd5a0ca1c440ef5c54 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 13 Apr 2018 08:17:25 -0600 Subject: [PATCH] net/sixlowpan: Fix a constant value used in IPv6 address decompression. The 0x0200 value used in the address modification should be in network order. --- net/sixlowpan/sixlowpan_hc06.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sixlowpan/sixlowpan_hc06.c b/net/sixlowpan/sixlowpan_hc06.c index 204cf69cbcd..7072e880617 100644 --- a/net/sixlowpan/sixlowpan_hc06.c +++ b/net/sixlowpan/sixlowpan_hc06.c @@ -3,7 +3,7 @@ * 6lowpan HC06 implementation (draft-ietf-6lowpan-hc-06, updated to RFC * 6282) * - * Copyright (C) 2017, Gregory Nutt, all rights reserved + * Copyright (C) 2017-2018 Gregory Nutt, all rights reserved * Author: Gregory Nutt * * Derives from Contiki: @@ -506,7 +506,7 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr, if (fullmac) { - ipaddr[7] ^= 0x0200; + ipaddr[7] ^= HTONS(0x0200); } /* If we took the data from packet, then update the packet pointer */