summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-04 20:19:53 +0200
committerFelix Fietkau <nbd@openwrt.org>2012-06-04 20:19:53 +0200
commit3bd580e340d2075194cb353da32e10393b006c55 (patch)
tree42d9b81dd24b1fa4c44f8adfbf30c1b1239c2812 /interface.c
parent56f3e9c817a8074ee8928e6a4b62320ffabcdb8b (diff)
interface: clean up after hotplug interfaces are removed
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c2
1 files changed, 2 insertions, 0 deletions
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