diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-04-21 19:11:34 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-04-21 19:11:34 +0200 |
commit | 2b3e96c491d6929a518ac2216d93c3dbcfa9bb1a (patch) | |
tree | 72a43321d65452b6fef2e9488a495f17f6e07147 /config.c | |
parent | ede9739fe90f5da09f14481d10a4f11c000072de (diff) |
config: add support for disabling interfaces
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |