summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Mortensen <willmo@gmail.com>2015-10-18 20:59:20 -0700
committerWill Mortensen <willmo@gmail.com>2015-10-20 23:04:13 -0700
commitbab0f8f6cd1d6badd8d5189dc50aa1692e107a7a (patch)
treea94826aa630927d579e21fbf39f01e570391df87
parentcb1842c117030e6779f9556cd5d86b1a0ef145d7 (diff)
downloadodhcpd-bab0f8f6cd1d6badd8d5189dc50aa1692e107a7a.tar.gz
Correctly byteswap DNS lifetimes in RAs
-rw-r--r--src/router.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/router.c b/src/router.c
index a23b530..526f9c2 100644
--- a/src/router.c
+++ b/src/router.c
@@ -430,7 +430,7 @@ static uint64_t send_router_advert(struct interface *iface, const struct in6_add
minival = (maxival * 3) / 4;
- search->lifetime = maxival / 100;
+ search->lifetime = htonl(maxival / 100);
dns.lifetime = search->lifetime;
odhcpd_urandom(&msecs, sizeof(msecs));