From: Steven Barth Date: Tue, 14 Jul 2015 19:49:57 +0000 (+0200) Subject: router: fix invalid router lifetime X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d0ca3022a4041e7232587b024ebfaadbe2c095cc;p=oweals%2Fodhcpd.git router: fix invalid router lifetime --- diff --git a/src/router.c b/src/router.c index fada62b..51fd954 100644 --- a/src/router.c +++ b/src/router.c @@ -437,7 +437,7 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add minival = (maxival * 3) / 4; if (adv.h.nd_ra_router_lifetime) - adv.h.nd_ra_router_lifetime = htons(maxvalid); + adv.h.nd_ra_router_lifetime = htons(maxvalid / 1000); odhcpd_urandom(&msecs, sizeof(msecs)); msecs = (labs(msecs) % (maxival - minival)) + minival;