summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/router.c b/src/router.c
index ddec21e..3ba552d 100644
--- a/src/router.c
+++ b/src/router.c
@@ -276,7 +276,7 @@ static void send_router_advert(struct uloop_timeout *event)
bool have_public = false;
size_t cnt = 0;
- struct in6_addr dns_pref, *dns_addr = &dns_pref;
+ struct in6_addr dns_pref = IN6ADDR_ANY_INIT, *dns_addr = &dns_pref;
uint32_t dns_time = 0;
size_t dns_cnt = 1;
@@ -344,7 +344,7 @@ static void send_router_advert(struct uloop_timeout *event)
dns_time = 2 * MaxRtrAdvInterval;
}
- if (!dns_addr)
+ if (!dns_addr || IN6_IS_ADDR_UNSPECIFIED(dns_addr))
dns_cnt = 0;
struct {