X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=includes.c;fp=includes.c;h=4221def04407e57feda25111417b39b2cb7b9106;hp=40995ca49c5e4738f2c6be733da019068b84b1b3;hb=46536e5263c4bf57a91c38b5d08d78c774649dda;hpb=4b8604dfbc46d3923d9506951560a0918207b4a6 diff --git a/includes.c b/includes.c index 40995ca..4221def 100644 --- a/includes.c +++ b/includes.c @@ -20,6 +20,8 @@ const struct fw3_option fw3_include_opts[] = { + FW3_OPT("enabled", bool, include, enabled), + FW3_OPT("path", string, include, path), FW3_OPT("type", include_type, include, type), FW3_OPT("family", family, include, family), @@ -50,10 +52,18 @@ fw3_load_includes(struct fw3_state *state, struct uci_package *p) continue; memset(include, 0, sizeof(*include)); + include->name = e->name; + include->enabled = true; fw3_parse_options(include, fw3_include_opts, s); + if (!include->enabled) + { + fw3_free_include(include); + continue; + } + if (!include->path) { warn_elem(e, "must specify a path");