mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
gnrc_netif_ieee802154: drop frame on buffer error
This adds a netdev recv call to indicate that the received frame should be dropped when there is no buffer space available to store the frame.
This commit is contained in:
parent
2df6da25f5
commit
ea6a2ef494
@ -88,6 +88,8 @@ static gnrc_pktsnip_t *_recv(gnrc_netif_t *netif)
|
||||
pkt = gnrc_pktbuf_add(NULL, NULL, bytes_expected, GNRC_NETTYPE_UNDEF);
|
||||
if (pkt == NULL) {
|
||||
DEBUG("_recv_ieee802154: cannot allocate pktsnip.\n");
|
||||
/* Discard packet on netdev device */
|
||||
dev->driver->recv(dev, NULL, bytes_expected, NULL);
|
||||
return NULL;
|
||||
}
|
||||
nread = dev->driver->recv(dev, pkt->data, bytes_expected, &rx_info);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user