don't overwrite interface config from netifd
[project/odhcpd.git] / src / config.c
index 4aaded9..baa8579 100644 (file)
@@ -270,7 +270,7 @@ int config_parse_interface(struct blob_attr *b, const char *name, bool overwrite
                iface = calloc(1, sizeof(*iface));
                strncpy(iface->name, name, sizeof(iface->name) - 1);
                list_add(&iface->head, &interfaces);
-       } else {
+       } else if (overwrite) {
                clean_interface(iface);
        }
 
@@ -499,6 +499,10 @@ void odhcpd_run(void)
        signal(SIGHUP, set_stop);
        signal(SIGINT, set_stop);
 
+#ifdef WITH_UBUS
+       init_ubus();
+#endif
+
        do {
                do_reload = uloop_cancelled = false;
 
@@ -558,7 +562,7 @@ void odhcpd_run(void)
 
 
                list_for_each_entry_safe(i, n, &interfaces, head) {
-                       if (i->inuse && !i->ignore) {
+                       if (i->inuse) {
                                // Resolve hybrid mode
                                if (i->dhcpv6 == RELAYD_HYBRID)
                                        i->dhcpv6 = (master && master->dhcpv6 == RELAYD_RELAY) ?