ndp: keep an exact copy of IPv6 interface addresses
[project/odhcpd.git] / src / dhcpv6.c
index 9f91162..4cd9e02 100644 (file)
@@ -18,6 +18,7 @@
 #include <stddef.h>
 #include <resolv.h>
 #include <sys/timerfd.h>
+#include <arpa/inet.h>
 
 #include "odhcpd.h"
 #include "dhcpv6.h"
@@ -89,6 +90,9 @@ int setup_dhcpv6_interface(struct interface *iface, bool enable)
                if (iface->dhcpv6 == RELAYD_SERVER)
                        setsockopt(sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &server, sizeof(server));
 
+               if (iface->dhcpv6 != RELAYD_RELAY || !iface->master)
+                       ndp_rqs_addr6_dump();
+
                iface->dhcpv6_event.uloop.fd = sock;
                iface->dhcpv6_event.handle_dgram = handle_dhcpv6;
                odhcpd_register(&iface->dhcpv6_event);