treewide: align function naming
[project/odhcpd.git] / src / dhcpv6-ia.c
index bd4342b..1a584c5 100644 (file)
@@ -53,7 +53,7 @@ int dhcpv6_ia_init(void)
        return 0;
 }
 
-int setup_dhcpv6_ia_interface(struct interface *iface, bool enable)
+int dhcpv6_setup_ia_interface(struct interface *iface, bool enable)
 {
        if (!enable && iface->ia_assignments.next) {
                struct dhcpv6_assignment *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) {