Keep interface down when interface auto parameter is set to 0 when doing 
network reload

Signed-off-by: Hans Dedecker <dedec...@gmail.com>
---
 interface.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/interface.c b/interface.c
index 733b5f1..4b5405e 100644
--- a/interface.c
+++ b/interface.c
@@ -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;
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to