From: Felix Fietkau Date: Tue, 18 Oct 2011 13:30:54 +0000 (+0200) Subject: clear errors before attempting to bring up an interface X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ee52049c03987bc0fb068495d153ecf08f81dbb;p=oweals%2Fnetifd.git clear errors before attempting to bring up an interface --- diff --git a/interface.c b/interface.c index e0c2c78..9d6a7c1 100644 --- a/interface.c +++ b/interface.c @@ -115,7 +115,6 @@ __interface_set_up(struct interface *iface) } return 0; - } static void @@ -363,14 +362,15 @@ interface_set_up(struct interface *iface) { iface->autostart = true; + if (iface->state != IFS_DOWN) + return 0; + + interface_clear_errors(iface); if (!iface->available) { interface_add_error(iface, "interface", "NO_DEVICE", NULL, 0); return -1; } - if (iface->state != IFS_DOWN) - return 0; - return __interface_set_up(iface); }