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

gnrc_ipv6_nib: don't stop sending router solicitations on last RA

When the default router was removed or could not be added, `dr` will
be NULL.

In this case, don't cease sending router solicitations - we still don't
have a default router.
This commit is contained in:
Benjamin Valentin 2021-07-14 13:05:42 +02:00
parent 7ed34c7377
commit 62308d200c

View File

@ -778,6 +778,12 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
break; break;
} }
} }
/* we still don't have a default router */
if (dr == NULL) {
return;
}
/* stop sending router solicitations /* stop sending router solicitations
* see https://tools.ietf.org/html/rfc4861#section-6.3.7 */ * see https://tools.ietf.org/html/rfc4861#section-6.3.7 */
evtimer_del(&_nib_evtimer, &netif->ipv6.search_rtr.event); evtimer_del(&_nib_evtimer, &netif->ipv6.search_rtr.event);