Skip to content
Snippets Groups Projects
Commit fd3f806e authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_ipv6_nib: release packet when NC entry can't be added

When the neighbor cache is full, the packet trying to resolve a
neighbor is not released.

This change fixes that.
parent 56bf7781
No related branches found
No related tags found
No related merge requests found
...@@ -1130,6 +1130,7 @@ static bool _resolve_addr(const ipv6_addr_t *dst, gnrc_netif_t *netif, ...@@ -1130,6 +1130,7 @@ static bool _resolve_addr(const ipv6_addr_t *dst, gnrc_netif_t *netif,
entry = _nib_nc_add(dst, (netif != NULL) ? netif->pid : 0, entry = _nib_nc_add(dst, (netif != NULL) ? netif->pid : 0,
GNRC_IPV6_NIB_NC_INFO_NUD_STATE_INCOMPLETE); GNRC_IPV6_NIB_NC_INFO_NUD_STATE_INCOMPLETE);
if (entry == NULL) { if (entry == NULL) {
gnrc_pktbuf_release(pkt);
return false; return false;
} }
#if GNRC_IPV6_NIB_CONF_ROUTER #if GNRC_IPV6_NIB_CONF_ROUTER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment