comparison 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
comparison
equal deleted inserted replaced
5534:605f7f9a20c0 5535:a0d828e25482
2874 ap->flags &= ~IPV6_AF_DELEGATEDLOG; 2874 ap->flags &= ~IPV6_AF_DELEGATEDLOG;
2875 } 2875 }
2876 2876
2877 TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) { 2877 TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) {
2878 if (!ifd->active) 2878 if (!ifd->active)
2879 continue;
2880 if (!(ifd->options->options & DHCPCD_CONFIGURE))
2879 continue; 2881 continue;
2880 k = 0; 2882 k = 0;
2881 carrier_warned = false; 2883 carrier_warned = false;
2882 TAILQ_FOREACH(ap, &state->addrs, next) { 2884 TAILQ_FOREACH(ap, &state->addrs, next) {
2883 if (!(ap->flags & IPV6_AF_DELEGATEDPFX)) 2885 if (!(ap->flags & IPV6_AF_DELEGATEDPFX))
2968 size_t i, j, k; 2970 size_t i, j, k;
2969 struct if_ia *ia; 2971 struct if_ia *ia;
2970 struct if_sla *sla; 2972 struct if_sla *sla;
2971 struct interface *ifd; 2973 struct interface *ifd;
2972 2974
2975 if (ifp->options != NULL &&
2976 !(ifp->options->options & DHCPCD_CONFIGURE))
2977 return 0;
2978
2973 k = 0; 2979 k = 0;
2974 TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) { 2980 TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) {
2975 ifo = ifd->options; 2981 ifo = ifd->options;
2976 state = D6_STATE(ifd); 2982 state = D6_STATE(ifd);
2977 if (state == NULL || state->state != DH6S_BOUND) 2983 if (state == NULL || state->state != DH6S_BOUND)
3193 state->rebind, dhcp6_startrebind, ifp); 3199 state->rebind, dhcp6_startrebind, ifp);
3194 if (state->expire != ND6_INFINITE_LIFETIME) 3200 if (state->expire != ND6_INFINITE_LIFETIME)
3195 eloop_timeout_add_sec(ifp->ctx->eloop, 3201 eloop_timeout_add_sec(ifp->ctx->eloop,
3196 state->expire, dhcp6_startexpire, ifp); 3202 state->expire, dhcp6_startexpire, ifp);
3197 3203
3198 ipv6_addaddrs(&state->addrs); 3204 if (ifp->options->options & DHCPCD_CONFIGURE) {
3199 if (!timedout) 3205 ipv6_addaddrs(&state->addrs);
3200 dhcp6_deprecateaddrs(&state->addrs); 3206 if (!timedout)
3207 dhcp6_deprecateaddrs(&state->addrs);
3208 }
3201 3209
3202 if (state->state == DH6S_INFORMED) 3210 if (state->state == DH6S_INFORMED)
3203 logmessage(loglevel, "%s: refresh in %"PRIu32" seconds", 3211 logmessage(loglevel, "%s: refresh in %"PRIu32" seconds",
3204 ifp->name, state->renew); 3212 ifp->name, state->renew);
3205 else if (state->renew == ND6_INFINITE_LIFETIME) 3213 else if (state->renew == ND6_INFINITE_LIFETIME)