ifupdown: handle state translation for ifdown aliases
This commit is contained in:
parent
89f2110254
commit
0624052339
1 changed files with 11 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue