From b04db5409a98ba58cd9b5c21766f74ccc5944345 Mon Sep 17 00:00:00 2001
From: Joakim Gebart <joakim.gebart@eistec.se>
Date: Fri, 17 Jul 2015 12:36:09 +0200
Subject: [PATCH] sys/net/network_layer/ng_sixlowpan/iphc: Correct 8 bit
 multicast decoding

---
 sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c b/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c
index e8e5e390d3..d5133216f1 100644
--- a/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c
+++ b/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c
@@ -329,10 +329,10 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt)
             break;
 
         case IPHC_M_DAC_DAM_M_8:
-            /* ffXX::XX: */
+            /* ff02::XX: */
             ng_ipv6_addr_set_unspecified(&ipv6_hdr->dst);
             ipv6_hdr->dst.u8[0] = 0xff;
-            ipv6_hdr->dst.u8[1] = iphc_hdr[payload_offset++];
+            ipv6_hdr->dst.u8[1] = 0x02;
             ipv6_hdr->dst.u8[15] = iphc_hdr[payload_offset++];
             break;
 
@@ -556,7 +556,7 @@ bool ng_sixlowpan_iphc_encode(ng_pktsnip_t *pkt)
             (ipv6_hdr->dst.u32[1].u32 == 0) &&
             (ipv6_hdr->dst.u16[4].u16 == 0)) {
             /* if multicast address is of format ff02::XX */
-            if ((ipv6_hdr->dst.u8[1] == 2) &&
+            if ((ipv6_hdr->dst.u8[1] == 0x02) &&
                 (ipv6_hdr->dst.u32[2].u32 == 0) &&
                 (ipv6_hdr->dst.u16[6].u16 == 0) &&
                 (ipv6_hdr->dst.u8[14] == 0)) {
-- 
GitLab