From: Felix Fietkau Date: Mon, 4 Jun 2012 18:19:53 +0000 (+0200) Subject: interface: clean up after hotplug interfaces are removed X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=3bd580e340d2075194cb353da32e10393b006c55 interface: clean up after hotplug interfaces are removed --- diff --git a/interface.c b/interface.c index 3215f49..01dabad 100644 --- a/interface.c +++ b/interface.c @@ -215,6 +215,8 @@ interface_cb(struct device_user *dep, enum device_event ev) } interface_set_available(iface, new_state); + if (!new_state && dep->dev->external) + interface_set_main_dev(iface, NULL); } void