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,15 +205,20 @@ main(int argc, char *argv[])
lifname = p;
}
struct lif_dict_entry *entry = lif_dict_find(&collection, lifname);
if (entry == NULL)
struct lif_interface *iface = lif_state_lookup(&state, &collection, argv[idx]);
if (iface == NULL)
{
fprintf(stderr, "%s: unknown interface %s\n", argv0, argv[idx]);
return EXIT_FAILURE;
struct lif_dict_entry *entry = lif_dict_find(&collection, lifname);
if (entry == NULL)
{
fprintf(stderr, "%s: unknown interface %s\n", argv0, argv[idx]);
return EXIT_FAILURE;
}
iface = entry->data;
}
struct lif_interface *iface = entry->data;
if (!change_interface(iface, &state, ifname))
return EXIT_FAILURE;
}