We should keep DHCP6 running even if routers expire or link changes.
This is noted in RFC3315 18.1.2:
If the client receives no responses before the message transmission
process terminates, as described in section 14, the client SHOULD
continue to use any IP addresses, using the last known
lifetimes for those addresses, and SHOULD continue to use any other
previously obtained configuration parameters.
dhcp6_freedrop(ifp, 0, NULL);
}
-void
-dhcp6_dropnondelegates(struct interface *ifp)
-{
-
-#ifndef SMALL
- if (dhcp6_hasprefixdelegation(ifp))
- return;
-#endif
- if (D6_CSTATE(ifp) == NULL)
- return;
-
- loginfox("%s: dropping DHCPv6 due to no valid routers", ifp->name);
- dhcp6_drop(ifp, "EXPIRE6");
-}
-
void
dhcp6_abort(struct interface *ifp)
{
int dhcp6_dadcompleted(const struct interface *);
void dhcp6_abort(struct interface *);
void dhcp6_drop(struct interface *, const char *);
-void dhcp6_dropnondelegates(struct interface *ifp);
int dhcp6_dump(struct interface *);
#endif /* DHCP6 */
else {
logwarnx("%s: no IPv6 Routers available", ifp->name);
ipv6nd_drop(ifp);
-#ifdef DHCP6
- dhcp6_dropnondelegates(ifp);
-#endif
}
}
struct timespec now, lt, expire, next;
bool expired, valid, validone;
struct ipv6_addr *ia;
-#ifdef DHCP6
- bool anyvalid = false;
-#endif
ifp = arg;
clock_gettime(CLOCK_MONOTONIC, &now);
* as well punt it. */
if (!valid && !validone)
ipv6nd_free_ra(rap);
-#ifdef DHCP6
- else
- anyvalid = true;
-#endif
}
if (timespecisset(&next))
rt_build(ifp->ctx, AF_INET6);
script_runreason(ifp, "ROUTERADVERT");
}
-
-#ifdef DHCP6
- /* No valid routers? Kill any DHCPv6. */
- if (!anyvalid)
- dhcp6_dropnondelegates(ifp);
-#endif
}
void