update proxy drivers and utils
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-core / busybox / busybox-1.19.4 / 0003-ifupdown-remove-interface-from-state_list-if-iface_u.patch
1 From a7b406ba64b7a4d9c9610726cb72568fc9848f5d Mon Sep 17 00:00:00 2001
2 From: Lauri Hintsala <lauri.hintsala@bluegiga.com>
3 Date: Wed, 14 Dec 2011 16:49:58 +0200
4 Subject: [PATCH 03/10] ifupdown: remove interface from state_list if iface_up
5  fails
6
7 Fix the issue where interface is set to the configured state even if
8 configuration has failed. Add error check to state setting logic.
9
10 Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 ---
13  networking/ifupdown.c |    2 +-
14  1 file changed, 1 insertion(+), 1 deletion(-)
15
16 diff --git a/networking/ifupdown.c b/networking/ifupdown.c
17 index 5946323..9c2cad2 100644
18 --- a/networking/ifupdown.c
19 +++ b/networking/ifupdown.c
20 @@ -1311,7 +1311,7 @@ int ifupdown_main(int argc UNUSED_PARAM, char **argv)
21                         llist_t *state_list = read_iface_state();
22                         llist_t *iface_state = find_iface_state(state_list, iface);
23  
24 -                       if (cmds == iface_up) {
25 +                       if (cmds == iface_up && !any_failures) {
26                                 char * const newiface = xasprintf("%s=%s", iface, liface);
27                                 if (iface_state == NULL) {
28                                         llist_add_to_end(&state_list, newiface);
29 -- 
30 1.7.10.4
31