From: Hans Dedecker Date: Wed, 7 May 2014 09:19:08 +0000 (+0000) Subject: netifd: Check interface state only when main device is set during interface_change_config X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b7662c5841214c105a174fdc9ab9fac870abab9;p=oweals%2Fnetifd.git netifd: Check interface state only when main device is set during interface_change_config Fixes a regression issue introduced by commit d2a33f3f0fe704e4396fa2ada08401cb955ba7cb for device less protocol handlers. An active interface using a deviceless protocol handler will be be teared down when the interface config is checked upon an update as the interface link and enabled parameters are unset as no underlying device is present (eg tunnel interfaces) Signed-off-by: Hans Dedecker --- diff --git a/interface.c b/interface.c index 95e1ee8..a4d7b8d 100644 --- a/interface.c +++ b/interface.c @@ -1020,7 +1020,8 @@ interface_change_config(struct interface *if_old, struct interface *if_new) } interface_write_resolv_conf(); - interface_check_state(if_old); + if (if_old->main_dev.dev) + interface_check_state(if_old); out: if_new->config = NULL;