+ 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_rules(void)
+{
+ struct uci_element *e;
+
+ iprule_update_start();
+
+ uci_foreach_element(&uci_network->sections, e) {
+ struct uci_section *s = uci_to_section(e);
+
+ if (!strcmp(s->type, "rule"))
+ config_parse_rule(s, false);
+ else if (!strcmp(s->type, "rule6"))
+ config_parse_rule(s, true);
+ }
+
+ iprule_update_complete();
+}
+
+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);
+}
+
+static void
+config_parse_wireless_device(struct uci_section *s)
+{
+ struct wireless_driver *drv;
+ const char *driver_name;
+
+ driver_name = uci_lookup_option_string(uci_ctx, s, "type");
+ if (!driver_name)
+ return;
+
+ drv = avl_find_element(&wireless_drivers, driver_name, drv, node);
+ if (!drv)
+ return;
+
+ blob_buf_init(&b, 0);
+ uci_to_blob(&b, s, drv->device.config);
+ wireless_device_create(drv, s->e.name, b.head);
+}
+
+static void
+config_parse_wireless_interface(struct wireless_device *wdev, struct uci_section *s)
+{
+ char *name;
+
+ name = alloca(strlen(s->type) + 16);
+ sprintf(name, "@%s[%d]", s->type, config_section_idx(s));
+
+ blob_buf_init(&b, 0);
+ uci_to_blob(&b, s, wdev->drv->interface.config);
+ wireless_interface_create(wdev, b.head, s->anonymous ? name : s->e.name);
+}
+
+static void
+config_init_wireless(void)
+{
+ struct wireless_device *wdev;
+ struct uci_element *e;
+ const char *dev_name;
+
+ if (!uci_wireless) {
+ DPRINTF("No wireless configuration found\n");