1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 08:21:18 +01:00

Merge pull request #9563 from bergzand/pr/netif/netdev_recv_reset

gnrc_netif_ieee802154: drop frame on buffer error
This commit is contained in:
Peter Kietzmann 2018-07-13 16:21:33 +02:00 committed by GitHub
commit 9f34513eec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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