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;
|
lifname = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct lif_dict_entry *entry = lif_dict_find(&collection, lifname);
|
struct lif_interface *iface = lif_state_lookup(&state, &collection, argv[idx]);
|
||||||
|
if (iface == NULL)
|
||||||
if (entry == NULL)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: unknown interface %s\n", argv0, argv[idx]);
|
struct lif_dict_entry *entry = lif_dict_find(&collection, lifname);
|
||||||
return EXIT_FAILURE;
|
|
||||||
|
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))
|
if (!change_interface(iface, &state, ifname))
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue