1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #3950 from authmillenon/gnrc_sixlowpan_iphc/fix/set-mcast-ctx

gnrc_sixlowpan_iphc: actually set context for unicast prefix based comp
This commit is contained in:
Martine Lenders 2015-09-24 02:33:16 +02:00
commit 109b2ab522

View File

@ -606,6 +606,10 @@ bool gnrc_sixlowpan_iphc_encode(gnrc_pktsnip_t *pkt)
* (https://tools.ietf.org/html/rfc3306) with given context
* for unicast prefix -> context based compression */
iphc_hdr[IPHC2_IDX] |= SIXLOWPAN_IPHC2_DAC;
if ((ctx->flags_id & GNRC_SIXLOWPAN_CTX_FLAGS_CID_MASK) != 0) {
iphc_hdr[CID_EXT_IDX] |= ((ctx->flags_id & GNRC_SIXLOWPAN_CTX_FLAGS_CID_MASK)
<< 4);
}
iphc_hdr[inline_pos++] = ipv6_hdr->dst.u8[1];
iphc_hdr[inline_pos++] = ipv6_hdr->dst.u8[2];
memcpy(iphc_hdr + inline_pos, ipv6_hdr->dst.u16 + 6, 4);