mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
sys/net/network_layer/ng_sixlowpan/iphc: Set IPv6 header length after decoding.
This commit is contained in:
parent
7211208bdb
commit
f52b9ae972
@ -372,6 +372,10 @@ bool ng_sixlowpan_iphc_decode(ng_pktsnip_t *pkt)
|
||||
payload = ng_pktbuf_add(pkt, pkt->data, payload_offset, NG_NETTYPE_SIXLOWPAN);
|
||||
pkt = ng_pktbuf_remove_snip(pkt, payload);
|
||||
|
||||
/* set IPv6 header payload length field to the length of whatever is left
|
||||
* after removing the 6LoWPAN header */
|
||||
ipv6_hdr->len = byteorder_htons(pkt->size);
|
||||
|
||||
/* insert IPv6 header */
|
||||
ipv6->next = pkt->next;
|
||||
pkt->next = ipv6;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user