From: Steven Barth Date: Mon, 24 Feb 2014 13:36:28 +0000 (+0100) Subject: Don't announce :: as DNS X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d21af09a10de15f340b5bbd05ddf0603dae0584e;p=oweals%2Fodhcpd.git Don't announce :: as DNS --- 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 {