mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_ipv6: allow sending empty IPv6 packets
This commit is contained in:
parent
b50ad9ed4c
commit
c3efb91181
@ -348,7 +348,7 @@ static int _fill_ipv6_hdr(gnrc_netif_t *netif, gnrc_pktsnip_t *ipv6)
|
||||
DEBUG("ipv6: write protect up to payload to calculate checksum\n");
|
||||
payload = ipv6;
|
||||
prev = ipv6;
|
||||
do {
|
||||
while (_is_ipv6_hdr(payload) && (payload->next != NULL)) {
|
||||
/* IPv6 header itself was already write-protected in caller function,
|
||||
* just write protect extension headers and payload header */
|
||||
if ((payload = gnrc_pktbuf_start_write(payload->next)) == NULL) {
|
||||
@ -359,7 +359,7 @@ static int _fill_ipv6_hdr(gnrc_netif_t *netif, gnrc_pktsnip_t *ipv6)
|
||||
}
|
||||
prev->next = payload;
|
||||
prev = 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 */
|
||||
|
Loading…
Reference in New Issue
Block a user