projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ede9739
)
config: add support for disabling interfaces
author
Felix Fietkau
<
[email protected]
>
Mon, 21 Apr 2014 17:11:34 +0000
(19:11 +0200)
committer
Felix Fietkau
<
[email protected]
>
Mon, 21 Apr 2014 17:11:34 +0000
(19:11 +0200)
Signed-off-by: Felix Fietkau <
[email protected]
>
config.c
patch
|
blob
|
history
diff --git
a/config.c
b/config.c
index 14a91a5f767069f72f2b227a8e0374dbbdf1a185..1d04efd7d1caf86d67e192c84d6bdd2c24089cc4 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;
- const char *type = NULL;
+ const char *type = NULL
, *disabled
;
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)