net: 6lo: Fix handling SAM_00 mode for packets with context
The uncompressed source address in packets was not handled properly if
NET_6LO_CONTEXT was enabled.
This implementation is identical to the contextless case.
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
diff --git a/subsys/net/ip/6lo.c b/subsys/net/ip/6lo.c
index 923c612..ab53cb9 100644
--- a/subsys/net/ip/6lo.c
+++ b/subsys/net/ip/6lo.c
@@ -918,6 +918,12 @@
}
switch (CIPHC[1] & NET_6LO_IPHC_SAM_11) {
+ case NET_6LO_IPHC_SAM_00:
+ NET_DBG("SAM_00 full src addr inlined");
+
+ memcpy(ipv6->src.s6_addr, &CIPHC[offset], 16);
+ offset += 16;
+ break;
case NET_6LO_IPHC_SAM_01:
NET_DBG("SAM_01 last 64 bits are inlined");