summaryrefslogtreecommitdiffhomepage
path: root/src/router.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2015-07-14 21:49:57 +0200
committerSteven Barth <steven@midlink.org>2015-07-14 21:49:57 +0200
commitd0ca3022a4041e7232587b024ebfaadbe2c095cc (patch)
treeabaf2ad3d152b6669ac3f81e81ce7edb67d7025a /src/router.c
parent6ce8886defe05cdc5f6cbe1ec2f060743d8d5e15 (diff)
router: fix invalid router lifetime
Diffstat (limited to 'src/router.c')
-rw-r--r--src/router.c2
1 files changed, 1 insertions, 1 deletions
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;