aboutgitcodebugslistschat
path: root/ndp.c
diff options
context:
space:
mode:
Diffstat (limited to 'ndp.c')
-rw-r--r--ndp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ndp.c b/ndp.c
index a33239d..eb9e313 100644
--- a/ndp.c
+++ b/ndp.c
@@ -227,7 +227,8 @@ static void ndp_na(const struct ctx *c, const struct in6_addr *dst,
*/
void ndp_unsolicited_na(const struct ctx *c, const struct in6_addr *addr)
{
- ndp_na(c, &in6addr_ll_all_nodes, addr);
+ if (tap_is_ready(c))
+ ndp_na(c, &in6addr_ll_all_nodes, addr);
}
/**
@@ -411,7 +412,7 @@ void ndp_timer(const struct ctx *c, const struct timespec *now)
time_t max_rtr_adv_interval = DEFAULT_MAX_RTR_ADV_INTERVAL;
time_t min_rtr_adv_interval, interval;
- if (c->fd_tap < 0 || c->no_ra || now->tv_sec < next_ra)
+ if (!tap_is_ready(c) || c->no_ra || now->tv_sec < next_ra)
return;
/* We must advertise before the route's lifetime expires */