summaryrefslogtreecommitdiffhomepage
path: root/src/dhcpv6-ia.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dhcpv6-ia.c')
-rw-r--r--src/dhcpv6-ia.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index bd4342b..dd549e6 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -397,9 +397,9 @@ void dhcpv6_write_statefile(void)
(c->valid_until > now ?
(c->valid_until - now + wall_time) :
(INFINITE_VALID(c->valid_until) ? -1 : 0)),
- c->addr);
+ ntohl(c->addr));
- struct in_addr addr = {htonl(c->addr)};
+ struct in_addr addr = {.s_addr = c->addr};
inet_ntop(AF_INET, &addr, ipbuf, sizeof(ipbuf) - 1);
if (c->hostname) {