X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=config.c;h=94a7fdbccb8b71acb728ddc4433ef100aab6f7bb;hp=6019862465d4a95e41ea0dcccc8308678ac55b0b;hb=fd4efb1bbfe5a502a802f43871cfae9944c8d75f;hpb=6443a383c54dee0cd3b9858801e0b765147a4ef4 diff --git a/config.c b/config.c index 6019862..94a7fdb 100644 --- a/config.c +++ b/config.c @@ -10,7 +10,7 @@ #include "interface.h" struct uci_context *uci_ctx; -struct uci_package *uci_network; +static struct uci_package *uci_network; bool config_init = false; enum { @@ -34,7 +34,7 @@ config_parse_interface(struct uci_section *s) DPRINTF("Create interface '%s'\n", s->e.name); - iface = alloc_interface(s->e.name); + iface = alloc_interface(s->e.name, s); if (!iface) return; @@ -180,6 +180,7 @@ config_init_interfaces(const char *name) if (!strcmp(s->type, "interface")) config_parse_interface(s); } + cleanup_devices(); config_init = false; start_pending_interfaces();