From: Hans Dedecker Date: Fri, 17 Aug 2018 13:55:00 +0000 (+0200) Subject: interface: ensure NO_DEVICE error is always reported X-Git-Url: https://git.librecmc.org/?p=oweals%2Fnetifd.git;a=commitdiff_plain;h=de394b30b895acc7b4cd4d5ddc78e4710747e613 interface: ensure NO_DEVICE error is always reported Remove interface available checks in the functions interface_start_pending and interface_handle_config_change so the NO_DEVICE error is reported in ifstatus making it clear to the user the configured device in ifname is not found Signed-off-by: Hans Dedecker --- diff --git a/interface.c b/interface.c index e32f08a..6be10e2 100644 --- a/interface.c +++ b/interface.c @@ -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); } }