From: Felix Fietkau Date: Fri, 2 May 2014 17:04:42 +0000 (+0200) Subject: interface: clear iface->available before changing main_dev X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=023db1ca8f352a646700f2d60c397fb89492f4c8;p=project%2Fnetifd.git interface: clear iface->available before changing main_dev Fixes bogus interface restart loop on interface_remove_link Signed-off-by: Felix Fietkau --- diff --git a/interface.c b/interface.c index 65bc37d..95e1ee8 100644 --- a/interface.c +++ b/interface.c @@ -780,6 +780,7 @@ interface_set_main_dev(struct interface *iface, struct device *dev) if (iface->main_dev.dev == dev) return; + interface_set_available(iface, false); device_add_user(&iface->main_dev, dev); if (!dev) { interface_set_link_state(iface, false);