mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 14:03:55 +01:00
gnrc_sixlowpan_frag: check if own message queue is full
When issueing the sending of the next fragment the current version of `gnrc_sixlowpan_frag` doesn't check if the queue is full. This leads to leakage of the packet buffer, since when it is full, the package never gets released. This change adds a checks and error exits in case the queue is full.
This commit is contained in:
parent
d5bbf45d32
commit
9e3cdebae1
@ -287,7 +287,11 @@ void gnrc_sixlowpan_frag_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
|
||||
fragment_msg->offset += res;
|
||||
msg.type = GNRC_SIXLOWPAN_MSG_FRAG_SND,
|
||||
msg.content.ptr = fragment_msg;
|
||||
msg_send_to_self(&msg);
|
||||
if (msg_send_to_self(&msg) == 0) {
|
||||
printf("6lo frag: message queue full, can't issue next fragment "
|
||||
"sending\n");
|
||||
goto error;
|
||||
}
|
||||
thread_yield();
|
||||
return;
|
||||
error:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user