diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-18 15:30:54 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-18 15:30:54 +0200 |
commit | 0ee52049c03987bc0fb068495d153ecf08f81dbb (patch) | |
tree | 352f14af7ebf11326cd08bbc90a053096e8a45fb /interface.c | |
parent | cb9d7370302cb0ffc0c750e928f5413089cbca4c (diff) |
clear errors before attempting to bring up an interface
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 8 |
1 files changed, 4 insertions, 4 deletions
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); } |