From db99fce3f59d1a9629ca5bc7ec8f8208acf02816 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 4 Dec 2014 12:07:19 +0000 Subject: netifd: Fix interface auto disable when doing network reload Keep interface down when interface auto parameter is set to 0 when doing network reload Signed-off-by: Hans Dedecker --- 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; -- cgit v1.2.3