summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-06-12 13:43:27 +0100
committerRoy Marples <roy@marples.name>2019-06-12 19:46:36 +0100
commit56659b7a2c22cf20d86e87f8b0bcf3f056f277bd (patch)
tree3e11a3f2e3861dcf22e9d692014a1bd1cbdd372e
parent146b91ecb30687f438d1368c171c7f86eaa56ea6 (diff)
downloaddhcpcd-56659b7a2c22cf20d86e87f8b0bcf3f056f277bd.tar.xz
DHCP6: Keep running regardless of RA state
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.
-rw-r--r--src/dhcp6.c15
-rw-r--r--src/dhcp6.h1
-rw-r--r--src/ipv6nd.c16
3 files changed, 0 insertions, 32 deletions
diff --git a/src/dhcp6.c b/src/dhcp6.c
index 7f26129f..e977e475 100644
--- a/src/dhcp6.c
+++ b/src/dhcp6.c
@@ -3935,21 +3935,6 @@ dhcp6_free(struct interface *ifp)
}
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)
{
struct dhcp6_state *state;
diff --git a/src/dhcp6.h b/src/dhcp6.h
index a670566d..8853d7f8 100644
--- a/src/dhcp6.h
+++ b/src/dhcp6.h
@@ -235,7 +235,6 @@ void dhcp6_handleifa(int, struct ipv6_addr *, pid_t);
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 */
diff --git a/src/ipv6nd.c b/src/ipv6nd.c
index b5e503cc..947257ad 100644
--- a/src/ipv6nd.c
+++ b/src/ipv6nd.c
@@ -382,9 +382,6 @@ ipv6nd_sendrsprobe(void *arg)
else {
logwarnx("%s: no IPv6 Routers available", ifp->name);
ipv6nd_drop(ifp);
-#ifdef DHCP6
- dhcp6_dropnondelegates(ifp);
-#endif
}
}
@@ -1525,9 +1522,6 @@ ipv6nd_expirera(void *arg)
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);
@@ -1603,10 +1597,6 @@ ipv6nd_expirera(void *arg)
* as well punt it. */
if (!valid && !validone)
ipv6nd_free_ra(rap);
-#ifdef DHCP6
- else
- anyvalid = true;
-#endif
}
if (timespecisset(&next))
@@ -1616,12 +1606,6 @@ ipv6nd_expirera(void *arg)
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