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>
This commit is contained in:
Mateusz Hołenko 2017-05-16 14:32:50 +02:00 committed by Jukka Rissanen
commit 634f875e19

View file

@ -918,6 +918,12 @@ static inline u8_t uncompress_sa_ctx(struct net_pkt *pkt,
} }
switch (CIPHC[1] & NET_6LO_IPHC_SAM_11) { 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: case NET_6LO_IPHC_SAM_01:
NET_DBG("SAM_01 last 64 bits are inlined"); NET_DBG("SAM_01 last 64 bits are inlined");