Skip to content
Snippets Groups Projects
Commit d4f425bb authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_ipv6: allow for empty IPv6 header

parent 3ec37acb
No related branches found
No related tags found
No related merge requests found
......@@ -392,12 +392,17 @@ static int _fill_ipv6_hdr(gnrc_netif_t *netif, gnrc_pktsnip_t *ipv6)
/* check if e.g. extension header was not already marked */
if (hdr->nh == PROTNUM_RESERVED) {
hdr->nh = gnrc_nettype_to_protnum(ipv6->next->type);
/* if still reserved: mark no next header */
if (hdr->nh == PROTNUM_RESERVED) {
if (ipv6->next == NULL) {
hdr->nh = PROTNUM_IPV6_NONXT;
}
else {
hdr->nh = gnrc_nettype_to_protnum(ipv6->next->type);
/* if still reserved: mark no next header */
if (hdr->nh == PROTNUM_RESERVED) {
hdr->nh = PROTNUM_IPV6_NONXT;
}
}
}
DEBUG("ipv6: set next header to %u\n", hdr->nh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment