Skip to content

Commit

Permalink
ndp: assert that rtr adv interval is never 0
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegHahm committed Sep 20, 2015
1 parent 8a554ab commit 1a0a1d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sys/net/gnrc/network_layer/ndp/router/gnrc_ndp_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))) {
Expand Down

0 comments on commit 1a0a1d6

Please sign in to comment.