Fix last commit
[project/odhcpd.git] / src / config.c
index e455965..e31740b 100644 (file)
@@ -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;
 
@@ -532,7 +536,7 @@ void odhcpd_run(void)
 #endif
 
                // Evaluate hybrid mode for master
-               struct interface *master = NULL, *i;
+               struct interface *master = NULL, *i, *n;
                list_for_each_entry(i, &interfaces, head) {
                        if (!i->master)
                                continue;
@@ -557,8 +561,8 @@ void odhcpd_run(void)
                }
 
 
-               list_for_each_entry(i, &interfaces, head) {
-                       if (i->inuse && !i->ignore) {
+               list_for_each_entry_safe(i, n, &interfaces, head) {
+                       if (i->inuse) {
                                // Resolve hybrid mode
                                if (i->dhcpv6 == RELAYD_HYBRID)
                                        i->dhcpv6 = (master && master->dhcpv6 == RELAYD_RELAY) ?