diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-07-12 23:20:38 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-07-12 23:22:24 +0200 |
commit | f096d021fb4119a449a7980e1667c2033491dba7 (patch) | |
tree | e57e29a08206b279b56c2805ea0cf08c8a18fbc5 | |
parent | c91756d651ebbcb2abe69f782e99a478eb865e78 (diff) |
ensure hotplug devices are marked as present in the add path - they are not cleaned up if they have config settings attached to them
-rw-r--r-- | ubus.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -562,10 +562,12 @@ netifd_iface_handle_device(struct ubus_context *ctx, struct ubus_object *obj, if (add && !dev) return UBUS_STATUS_NOT_FOUND; - if (add) + if (add) { + device_set_present(dev, true); ret = interface_add_link(iface, dev); - else + } else { ret = interface_remove_link(iface, dev); + } device_unlock(); |