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

gnrc_ipv6: fix _fill_ipv6_hdr() for pure IPv6 packets

If a packet only contains IPv6 and IPv6 extension header snips (e.g. if
the IPv6 packet has no payload or if an extension header was not
pre-parsed)
parent 3b1a7d0e
No related branches found
No related tags found
No related merge requests found
......@@ -442,7 +442,7 @@ static int _fill_ipv6_hdr(gnrc_netif_t *netif, gnrc_pktsnip_t *ipv6)
}
prev->next = payload;
prev = payload;
} while (_is_ipv6_hdr(payload));
} while (_is_ipv6_hdr(payload) && (payload->next != NULL));
DEBUG("ipv6: calculate checksum for upper header.\n");
if ((res = gnrc_netreg_calc_csum(payload, ipv6)) < 0) {
if (res != -ENOENT) { /* if there is no checksum we are okay */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment