X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fodhcpd.git;a=blobdiff_plain;f=src%2Fdhcpv6-ia.c;h=6568c69446655d8922aeb4ae74a0923ad8df2a26;hp=bd4342b7cae710c6929b24d3b948ec7feacf1f95;hb=24cdc1b59f00a065dd1cf0a04145ca6aaf6f23f1;hpb=f0e354befd6f787c1ed8ebc1ea514e9195f54433 diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index bd4342b..6568c69 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -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) { @@ -454,7 +454,7 @@ static void apply_lease(struct interface *iface, struct dhcpv6_assignment *a, bo struct in6_addr prefix = addrs[i].addr.in6; prefix.s6_addr32[1] |= htonl(a->assigned); prefix.s6_addr32[2] = prefix.s6_addr32[3] = 0; - odhcpd_setup_route(&prefix, (a->managed_size) ? addrs[i].prefix : a->length, + netlink_setup_route(&prefix, (a->managed_size) ? addrs[i].prefix : a->length, iface, &a->peer.sin6_addr, 1024, add); } }