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:
parent
8a554abfa6
commit
1a0a1d6fb9
@ -90,6 +90,7 @@ static void _send_rtr_adv(gnrc_ipv6_netif_t *iface, ipv6_addr_t *dst)
|
|||||||
|
|
||||||
mutex_lock(&iface->mutex);
|
mutex_lock(&iface->mutex);
|
||||||
fin = (iface->adv_ltime == 0);
|
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);
|
interval = genrand_uint32_range(iface->min_adv_int, iface->max_adv_int);
|
||||||
if (!fin && !((iface->flags | GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
|
if (!fin && !((iface->flags | GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
|
||||||
(iface->flags | GNRC_IPV6_NETIF_FLAGS_RTR_ADV))) {
|
(iface->flags | GNRC_IPV6_NETIF_FLAGS_RTR_ADV))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user