fix up tests

This commit is contained in:
Ariadne Conill 2020-07-20 08:24:31 -06:00
parent aa1cc0815c
commit 09057aa977
2 changed files with 15 additions and 6 deletions

View file

@ -234,6 +234,15 @@ main(int argc, char *argv[])
for (; idx < argc; idx++)
{
struct lif_interface *iface = lif_state_lookup(&state, &collection, argv[idx]);
if (iface == NULL)
{
struct lif_dict_entry *entry = lif_dict_find(&collection, argv[idx]);
if (entry != NULL)
iface = entry->data;
}
if (iface == NULL)
{
fprintf(stderr, "ifquery: unknown interface %s\n", argv[idx]);