struct odhcpd_ipaddr addrs[8];
ssize_t ipcnt = 0;
int64_t minvalid = INT64_MAX;
- int64_t maxvalid = 0;
// If not shutdown
if (iface->timer_rs.cb) {
minvalid > 1000LL * TIME_LEFT(addr->valid, now))
minvalid = 1000LL * TIME_LEFT(addr->valid, now);
- if (maxvalid < 1000LL * TIME_LEFT(addr->valid, now))
- maxvalid = 1000LL * TIME_LEFT(addr->valid, now);
-
if (((addr->addr.s6_addr[0] & 0xfe) != 0xfc || iface->default_router)
&& ntohs(adv.h.nd_ra_router_lifetime) < TIME_LEFT(addr->valid, now))
adv.h.nd_ra_router_lifetime = htons(TIME_LEFT(addr->valid, now));
minival = (maxival * 3) / 4;
- search->lifetime = htonl(maxvalid / 1000);
+ search->lifetime = maxival / 100;
dns.lifetime = search->lifetime;
odhcpd_urandom(&msecs, sizeof(msecs));