summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-11-21 11:59:07 +0000
committerRoy Marples <roy@marples.name>2020-11-21 11:59:07 +0000
commit9b683ed33dbd9c6b6f3af71496a28edd584fc45a (patch)
treefeec89d474f6d9bd7c871ece76943f412e34019d
parentf8771a152f6e6fb2ac04027c22712a9ac12a606f (diff)
downloaddhcpcd-9b683ed33dbd9c6b6f3af71496a28edd584fc45a.tar.xz
DHCP6: Delegated activations work once more
This was broken with the --noconfigure option in dhcpcd-9.3.3
-rw-r--r--src/if-options.c6
-rw-r--r--src/route.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/if-options.c b/src/if-options.c
index 9a261c07..653cb03d 100644
--- a/src/if-options.c
+++ b/src/if-options.c
@@ -2343,6 +2343,8 @@ default_config(struct dhcpcd_ctx *ctx)
#endif
/* Inherit some global defaults */
+ if (ctx->options & DHCPCD_CONFIGURE)
+ ifo->options |= DHCPCD_CONFIGURE;
if (ctx->options & DHCPCD_PERSISTENT)
ifo->options |= DHCPCD_PERSISTENT;
if (ctx->options & DHCPCD_SLAACPRIVATE)
@@ -2371,8 +2373,8 @@ read_config(struct dhcpcd_ctx *ctx,
if ((ifo = default_config(ctx)) == NULL)
return NULL;
if (default_options == 0) {
- default_options |= DHCPCD_DAEMONISE |
- DHCPCD_CONFIGURE | DHCPCD_GATEWAY;
+ default_options |= DHCPCD_CONFIGURE | DHCPCD_DAEMONISE |
+ DHCPCD_GATEWAY;
#ifdef INET
skip = socket(PF_INET, SOCK_DGRAM, 0);
if (skip != -1) {
diff --git a/src/route.c b/src/route.c
index 724b1f17..47fd6cf2 100644
--- a/src/route.c
+++ b/src/route.c
@@ -713,8 +713,10 @@ rt_build(struct dhcpcd_ctx *ctx, int af)
#endif
RB_TREE_FOREACH_SAFE(rt, &routes, rtn) {
- if (rt->rt_ifp->active &&
- !(rt->rt_ifp->options->options & DHCPCD_CONFIGURE))
+ if (rt->rt_ifp->active) {
+ if (!(rt->rt_ifp->options->options & DHCPCD_CONFIGURE))
+ continue;
+ } else if (!(ctx->options & DHCPCD_CONFIGURE))
continue;
#ifdef BSD
if (rt_is_default(rt) &&