interface: ensure NO_DEVICE error is always reported
authorHans Dedecker <dedeckeh@gmail.com>
Fri, 17 Aug 2018 13:55:00 +0000 (15:55 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 17 Aug 2018 14:10:10 +0000 (16:10 +0200)
Remove interface available checks in the functions interface_start_pending
and interface_handle_config_change so the NO_DEVICE error is reported in
ifstatus <interface> making it clear to the user the configured device in
ifname is not found

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface.c

index e32f08a29050cc3e5eb138e32af62946d6b1c153..6be10e279b4dc8e16b2d98fa328efbc8ca408ac4 100644 (file)
@@ -695,7 +695,7 @@ interface_handle_config_change(struct interface *iface)
                interface_do_free(iface);
                return;
        }
-       if (iface->autostart && iface->available)
+       if (iface->autostart)
                interface_set_up(iface);
        else if (iface->dynamic)
                set_config_state(iface, IFC_REMOVE);
@@ -1103,7 +1103,7 @@ interface_start_pending(void)
        struct interface *iface;
 
        vlist_for_each_element(&interfaces, iface, node) {
-               if (iface->available && iface->autostart)
+               if (iface->autostart)
                        interface_set_up(iface);
        }
 }