mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-15 09:33:50 +01:00
gnrc_ipv6_ext_frag: fail on first fragment buffer is too small
This case can happen if a second, but larger first fragment is send after a smaller.
This commit is contained in:
parent
55564abb5d
commit
d64dcbb71f
@ -524,6 +524,11 @@ gnrc_pktsnip_t *gnrc_ipv6_ext_frag_reass(gnrc_pktsnip_t *pkt)
|
||||
DEBUG("ipv6_ext_frag: fragment length not divisible by 8");
|
||||
goto error_exit;
|
||||
}
|
||||
else if (rbuf->pkt != NULL && rbuf->pkt->size < pkt->size) {
|
||||
DEBUG("ipv6_ext_frag: reassembly buffer too small to fit first "
|
||||
"fragment\n");
|
||||
goto error_exit;
|
||||
}
|
||||
_set_nh(fh_snip->next, nh);
|
||||
gnrc_pktbuf_remove_snip(pkt, fh_snip);
|
||||
/* TODO: RFC 8200 says "- 8"; determine if `sizeof(ipv6_ext_frag_t)` is
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user