[OpenWrt-Devel] [PATCH 3/3] netifd: Set interface device config when device has old settings

Hans Dedecker dedeckeh at gmail.com
Thu Feb 12 11:41:17 EST 2015


If interface device settings are removed in UCI they were not removed in the
device settings; calling device_set_config when device settings are present
solves this.

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config.c b/config.c
index 34d2f2b..9108ab4 100644
--- a/config.c
+++ b/config.c
@@ -136,7 +136,7 @@ config_parse_interface(struct uci_section *s, bool alias)
 	if (blob_len(b.head) == 0)
 		return;
 
-	if (iface->device_config)
+	if (iface->device_config || dev->settings.flags)
 		device_set_config(dev, dev->type, b.head);
 	return;
 error_free_config:
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list