+ uci_foreach_element(&uci_network->sections, e) {
+ struct uci_section *s = uci_to_section(e);
+
+ if (!strcmp(s->type, "interface"))
+ config_parse_interface(s, false);
+ }
+
+ uci_foreach_element(&uci_network->sections, e) {
+ struct uci_section *s = uci_to_section(e);
+
+ if (!strcmp(s->type, "alias"))
+ config_parse_interface(s, true);
+ }
+}
+
+static void
+config_init_routes(void)
+{
+ struct interface *iface;
+ struct uci_element *e;
+
+ vlist_for_each_element(&interfaces, iface, node)
+ interface_ip_update_start(&iface->config_ip);
+
+ uci_foreach_element(&uci_network->sections, e) {
+ struct uci_section *s = uci_to_section(e);
+
+ if (!strcmp(s->type, "route"))
+ config_parse_route(s, false);
+ else if (!strcmp(s->type, "route6"))
+ config_parse_route(s, true);
+ }
+
+ vlist_for_each_element(&interfaces, iface, node)
+ interface_ip_update_complete(&iface->config_ip);
+}
+
+static void
+config_init_globals(void)
+{
+ struct uci_section *globals = uci_lookup_section(
+ uci_ctx, uci_network, "globals");
+ if (!globals)
+ return;
+
+ const char *ula_prefix = uci_lookup_option_string(
+ uci_ctx, globals, "ula_prefix");
+ interface_ip_set_ula_prefix(ula_prefix);
+}
+
+void
+config_init_all(void)
+{
+ uci_network = config_init_package("network");
+ if (!uci_network) {