Mercurial > hg > dhcpcd
diff src/dhcp6.c @ 5535:a0d828e25482 draft
Add --noconfigure option
With this set dhcpcd will not configure anything on the host.
The expectation is that a 3rd party script will instead.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 04 Nov 2020 14:18:48 +0000 |
| parents | 6a2da5651841 |
| children | ef762d54fb7a |
line wrap: on
line diff
--- a/src/dhcp6.c Wed Nov 04 11:31:40 2020 +1300 +++ b/src/dhcp6.c Wed Nov 04 14:18:48 2020 +0000 @@ -2877,6 +2877,8 @@ TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) { if (!ifd->active) continue; + if (!(ifd->options->options & DHCPCD_CONFIGURE)) + continue; k = 0; carrier_warned = false; TAILQ_FOREACH(ap, &state->addrs, next) { @@ -2970,6 +2972,10 @@ struct if_sla *sla; struct interface *ifd; + if (ifp->options != NULL && + !(ifp->options->options & DHCPCD_CONFIGURE)) + return 0; + k = 0; TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) { ifo = ifd->options; @@ -3195,9 +3201,11 @@ eloop_timeout_add_sec(ifp->ctx->eloop, state->expire, dhcp6_startexpire, ifp); - ipv6_addaddrs(&state->addrs); - if (!timedout) - dhcp6_deprecateaddrs(&state->addrs); + if (ifp->options->options & DHCPCD_CONFIGURE) { + ipv6_addaddrs(&state->addrs); + if (!timedout) + dhcp6_deprecateaddrs(&state->addrs); + } if (state->state == DH6S_INFORMED) logmessage(loglevel, "%s: refresh in %"PRIu32" seconds",
