bool have_public = false;
size_t cnt = 0;
- struct in6_addr *dns_addr = NULL;
+ struct in6_addr dns_pref, *dns_addr = &dns_pref;
uint32_t dns_time = 0;
size_t dns_cnt = 1;
if (addr->preferred > dns_time) {
dns_time = addr->preferred;
- dns_addr = &addr->addr;
+ dns_pref = addr->addr;
}
}
routes[routes_cnt].lifetime = htonl(addr->valid);
routes[routes_cnt].addr[0] = addr->addr.s6_addr32[0];
routes[routes_cnt].addr[1] = addr->addr.s6_addr32[1];
- routes[routes_cnt].addr[2] = addr->addr.s6_addr32[2];
- routes[routes_cnt].addr[3] = addr->addr.s6_addr32[3];
+ routes[routes_cnt].addr[2] = 0;
+ routes[routes_cnt].addr[3] = 0;
++routes_cnt;
}