lifecycle: skip parent interfaces marked as explicitly configured when going down

these interfaces will be taken down by ifdown itself when appropriate
This commit is contained in:
Ariadne Conill 2020-10-21 08:11:45 -06:00
parent b201f351ec
commit 817262fa33

View file

@ -396,6 +396,15 @@ handle_dependents(const struct lif_execute_opts *opts, struct lif_interface *par
continue;
}
if (!up && iface->is_explicit)
{
if (opts->verbose)
fprintf(stderr, "ifupdown: skipping dependent interface %s (of %s) -- interface is marked as explicitly configured\n",
iface->ifname, parent->ifname);
continue;
}
if (opts->verbose)
fprintf(stderr, "ifupdown: changing state of dependent interface %s (of %s) to %s\n",
iface->ifname, parent->ifname, up ? "up" : "down");