dhcpv4: force renew nonce authentication support
[project/odhcpd.git] / src / dhcpv6-ia.c
index bd4342b..dd549e6 100644 (file)
@@ -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) {