dhcpv6: fix compile issues when CER-ID extension is enabled
authorHans Dedecker <dedeckeh@gmail.com>
Sat, 25 Nov 2017 16:42:00 +0000 (17:42 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Sat, 25 Nov 2017 16:49:25 +0000 (17:49 +0100)
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/dhcpv6.c

index 3edde955984954d3c03ecae6418f19b2978ced29..462a85ecfc8b2817fa958da3db92c323d209d7f0 100644 (file)
@@ -331,12 +331,12 @@ static void handle_client_request(void *addr, void *data, size_t len,
 
                        if (IN6_IS_ADDR_UNSPECIFIED(&cerid.addr)) {
                                struct odhcpd_ipaddr *addrs;
-                               ssize_t len = odhcpd_get_interface_addresses(0, true, &addrs);
+                               ssize_t len = netlink_get_interface_addrs(0, true, &addrs);
 
                                for (ssize_t i = 0; i < len; ++i)
                                        if (IN6_IS_ADDR_UNSPECIFIED(&cerid.addr)
                                                        || memcmp(&addrs[i].addr, &cerid.addr, sizeof(cerid.addr)) < 0)
-                                               cerid.addr = addrs[i].addr;
+                                               cerid.addr = addrs[i].addr.in6;
 
                                free(addrs);
                        }