summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2015-09-01 14:43:57 +0200
committerFelix Fietkau <nbd@openwrt.org>2015-09-02 17:29:51 +0200
commitd1c9d4bc6a6925fc3b39c1c4062c2b9082a4e161 (patch)
treec0c7b350f8954e9b06fec02a43e67dc8f21953a9
parente057fcb4a260c70f0271f8fdcd7140775a09791f (diff)
device: apply settings when existing device becomes external
Make sure device settings are applied when existing device becomes external Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/device.c b/device.c
index 4a8db70..0d73138 100644
--- a/device.c
+++ b/device.c
@@ -446,6 +446,7 @@ device_get(const char *name, int create)
dev = avl_find_element(&devices, name, dev, avl);
if (dev) {
if (create > 1 && !dev->external) {
+ system_if_apply_settings(dev, &dev->settings, dev->settings.flags);
dev->external = true;
device_set_present(dev, true);
}