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

ndp: assert that rtr adv interval is never 0

This commit is contained in:
Oleg Hahm 2015-09-20 21:40:05 +02:00
parent 8a554abfa6
commit 1a0a1d6fb9

View File

@ -90,6 +90,7 @@ static void _send_rtr_adv(gnrc_ipv6_netif_t *iface, ipv6_addr_t *dst)
mutex_lock(&iface->mutex);
fin = (iface->adv_ltime == 0);
assert((iface->min_adv_int != 0) && (iface->max_adv_int != 0));
interval = genrand_uint32_range(iface->min_adv_int, iface->max_adv_int);
if (!fin && !((iface->flags | GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
(iface->flags | GNRC_IPV6_NETIF_FLAGS_RTR_ADV))) {