X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=config.c;h=7720acf03084ca1d3cd79777047f3618cebb61bb;hp=14a91a5f767069f72f2b227a8e0374dbbdf1a185;hb=07e9b542017c692ee2abe7a8689517b466150944;hpb=386453cbc5cc8ecdfbe8c53ff8cd058945fd821b diff --git a/config.c b/config.c index 14a91a5..7720acf 100644 --- 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) @@ -163,12 +167,16 @@ config_init_devices(void) type = uci_lookup_option_string(uci_ctx, s, "type"); if (type) { - if (!strcmp(type, "bridge")) + if (!strcmp(type, "8021ad")) + devtype = &vlandev_device_type; + else if (!strcmp(type, "8021q")) + devtype = &vlandev_device_type; + else if (!strcmp(type, "bridge")) devtype = &bridge_device_type; - else if (!strcmp(type, "tunnel")) - devtype = &tunnel_device_type; else if (!strcmp(type, "macvlan")) devtype = &macvlan_device_type; + else if (!strcmp(type, "tunnel")) + devtype = &tunnel_device_type; } if (!devtype)