diff options
author | Lauri Hintsala <lauri.hintsala@bluegiga.com> | 2011-12-14 16:49:58 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-12-15 12:33:39 +0100 |
commit | 454fe29a802f5f32b802df1a54324946d0b87669 (patch) | |
tree | ddb2d1f8cf0e268cb37ed41bc3f821ea75414be4 | |
parent | 1b41b33be34305e75eb8998f408f79193d7241e5 (diff) | |
download | busybox-w32-454fe29a802f5f32b802df1a54324946d0b87669.tar.gz busybox-w32-454fe29a802f5f32b802df1a54324946d0b87669.tar.bz2 busybox-w32-454fe29a802f5f32b802df1a54324946d0b87669.zip |
ifupdown: remove interface from state_list if iface_up fails
Fix the issue where interface is set to the configured state even if
configuration has failed. Add error check to state setting logic.
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/ifupdown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 5946323d0..9c2cad231 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -1311,7 +1311,7 @@ int ifupdown_main(int argc UNUSED_PARAM, char **argv) | |||
1311 | llist_t *state_list = read_iface_state(); | 1311 | llist_t *state_list = read_iface_state(); |
1312 | llist_t *iface_state = find_iface_state(state_list, iface); | 1312 | llist_t *iface_state = find_iface_state(state_list, iface); |
1313 | 1313 | ||
1314 | if (cmds == iface_up) { | 1314 | if (cmds == iface_up && !any_failures) { |
1315 | char * const newiface = xasprintf("%s=%s", iface, liface); | 1315 | char * const newiface = xasprintf("%s=%s", iface, liface); |
1316 | if (iface_state == NULL) { | 1316 | if (iface_state == NULL) { |
1317 | llist_add_to_end(&state_list, newiface); | 1317 | llist_add_to_end(&state_list, newiface); |