projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bridge: increase the default forward delay to 2 seconds (minimum enforced by the...
[project/netifd.git]
/
config.c
diff --git
a/config.c
b/config.c
index
5a2e439
..
ba97a5c
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-176,6
+176,14
@@
config_parse_interface(struct uci_section *s)
memcpy(config, b.head, blob_pad_len(b.head));
interface_add(iface, config);
memcpy(config, b.head, blob_pad_len(b.head));
interface_add(iface, config);
+ /*
+ * need to look up the interface name again, in case of config update,
+ * the pointer will have changed
+ */
+ iface = vlist_find(&interfaces, s->e.name, iface, node);
+ if (!iface)
+ return;
+
dev = iface->main_dev.dev;
if (!dev || !dev->default_config)
return;
dev = iface->main_dev.dev;
if (!dev || !dev->default_config)
return;
@@
-337,7
+345,7
@@
config_init_package(const char *config)
uci_unload(ctx, p);
}
uci_unload(ctx, p);
}
- if (uci_load(ctx,
"network"
, &p))
+ if (uci_load(ctx,
config
, &p))
return NULL;
return p;
return NULL;
return p;
@@
-387,6
+395,7
@@
config_init_all(void)
return;
}
return;
}
+ vlist_update(&interfaces);
config_init = true;
device_lock();
config_init = true;
device_lock();
@@
-401,5
+410,6
@@
config_init_all(void)
device_reset_old();
device_init_pending();
device_free_unused(NULL);
device_reset_old();
device_init_pending();
device_free_unused(NULL);
+ vlist_flush(&interfaces);
interface_start_pending();
}
interface_start_pending();
}