mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 18:44:10 +08:00
Now all interfaces are loaded, don't try to load one for delegation.
This commit is contained in:
parent
df2522249f
commit
0ba37e7e81
22
dhcp6.c
22
dhcp6.c
@ -2473,7 +2473,7 @@ dhcp6_delegate_prefix(struct interface *ifp)
|
||||
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++) {
|
||||
@ -2482,21 +2482,19 @@ dhcp6_delegate_prefix(struct interface *ifp)
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user