ifo = ifp->options;
state = D6_STATE(ifp);
- /* Try to load configured interfaces for delegation that do not exist */
+ /* Ensure we have all interfaces */
for (i = 0; i < ifo->ia_len; i++) {
ia = &ifo->ia[i];
for (j = 0; j < ia->sla_len; j++) {
if (strcmp(sla->ifname, ia->sla[j].ifname) == 0)
break;
if (j >= i &&
- if_find(ifp->ctx->ifaces, sla->ifname) == NULL)
- {
- logger(ifp->ctx, LOG_INFO,
- "%s: loading for delegation", sla->ifname);
- if (dhcpcd_handleinterface(ifp->ctx, 2,
- sla->ifname) == -1)
- logger(ifp->ctx, LOG_ERR,
- "%s: interface does not exist"
- " for delegation",
- sla->ifname);
- }
+ ((ifd = if_find(ifp->ctx->ifaces,
+ sla->ifname)) == NULL ||
+ !ifd->active))
+ logger(ifp->ctx, LOG_ERR,
+ "%s: interface does not exist"
+ " for delegation",
+ sla->ifname);
}
}
TAILQ_FOREACH(ifd, ifp->ctx->ifaces, next) {
+ if (!ifd->active)
+ continue;
k = 0;
carrier_warned = abrt = 0;
TAILQ_FOREACH(ap, &state->addrs, next) {