+static gboolean dhcpv6_restart(gpointer user_data)
+{
+ struct connman_dhcpv6 *dhcp = user_data;
+
+ if (dhcp->callback != NULL)
+ dhcp->callback(dhcp->network, FALSE);
+
+ return FALSE;
+}
+
+/*
+ * Check if we need to restart the solicitation procedure. This
+ * is done if all the addresses have expired. RFC 3315, 18.1.4
+ */
+static int check_restart(struct connman_dhcpv6 *dhcp)
+{
+ time_t current, expired;
+
+ g_dhcpv6_client_get_timeouts(dhcp->dhcp_client, NULL, NULL,
+ NULL, NULL, &expired);
+ current = time(0);
+
+ if (current > expired) {
+ DBG("expired by %d secs", (int)(current - expired));
+
+ g_timeout_add(0, dhcpv6_restart, dhcp);
+
+ return -ETIMEDOUT;
+ }
+
+ return 0;
+}
+