projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netifd: Apply interface metric on configured interface gateway parameters
[project/netifd.git]
/
config.c
diff --git
a/config.c
b/config.c
index
4fe72dc
..
1d04efd
100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-56,11
+56,15
@@
static void
config_parse_interface(struct uci_section *s, bool alias)
{
struct interface *iface;
config_parse_interface(struct uci_section *s, bool alias)
{
struct interface *iface;
- const char *type = NULL;
+ const char *type = NULL
, *disabled
;
struct blob_attr *config;
struct device *dev;
bool bridge = false;
struct blob_attr *config;
struct device *dev;
bool bridge = false;
+ disabled = uci_lookup_option_string(uci_ctx, s, "disabled");
+ if (disabled && !strcmp(disabled, "1"))
+ return;
+
blob_buf_init(&b, 0);
if (!alias)
blob_buf_init(&b, 0);
if (!alias)
@@
-190,6
+194,7
@@
config_init_package(const char *config)
ctx = uci_alloc_context();
uci_ctx = ctx;
ctx = uci_alloc_context();
uci_ctx = ctx;
+ ctx->flags &= ~UCI_FLAG_STRICT;
if (config_path)
uci_set_confdir(ctx, config_path);
if (config_path)
uci_set_confdir(ctx, config_path);