ifupdown: handle state translation for ifdown aliases

This commit is contained in:
Ariadne Conill 2020-07-24 00:15:26 -06:00
parent 89f2110254
commit 0624052339

View file

@ -205,6 +205,9 @@ main(int argc, char *argv[])
lifname = p; lifname = p;
} }
struct lif_interface *iface = lif_state_lookup(&state, &collection, argv[idx]);
if (iface == NULL)
{
struct lif_dict_entry *entry = lif_dict_find(&collection, lifname); struct lif_dict_entry *entry = lif_dict_find(&collection, lifname);
if (entry == NULL) if (entry == NULL)
@ -213,7 +216,9 @@ main(int argc, char *argv[])
return EXIT_FAILURE; return EXIT_FAILURE;
} }
struct lif_interface *iface = entry->data; iface = entry->data;
}
if (!change_interface(iface, &state, ifname)) if (!change_interface(iface, &state, ifname))
return EXIT_FAILURE; return EXIT_FAILURE;
} }