netifd: Fix interface auto disable when doing network reload
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 4 Dec 2014 12:07:19 +0000 (12:07 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 8 Dec 2014 17:13:45 +0000 (18:13 +0100)
Keep interface down when interface auto parameter is set to 0 when doing network reload

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
interface.c

index 733b5f10fd0fb0fdc005ef662c2d801e174c6dfe..4b5405ee228ed07047594e96871495487da15390 100644 (file)
@@ -1015,8 +1015,12 @@ interface_change_config(struct interface *if_old, struct interface *if_new)
        })
 
        if_old->config = if_new->config;
-       if (!if_old->config_autostart && if_new->config_autostart)
-               if_old->autostart = true;
+       if (if_old->config_autostart != if_new->config_autostart) {
+               if (if_old->config_autostart)
+                       reload = true;
+
+               if_old->autostart = if_new->config_autostart;
+       }
 
        if_old->device_config = if_new->device_config;
        if_old->config_autostart = if_new->config_autostart;