1
0
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:
Koen Zandberg 2018-07-12 16:15:00 +02:00
parent 2df6da25f5
commit ea6a2ef494
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -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);