From: Jo-Philipp Wich Date: Mon, 18 Nov 2013 12:37:30 +0000 (+0000) Subject: Skip rules with invalid options X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e5c8c87ce6e9423f1445020440e715ea9f9fc466;p=project%2Ffirewall3.git Skip rules with invalid options --- diff --git a/rules.c b/rules.c index bd2a57c..8ecefb0 100644 --- a/rules.c +++ b/rules.c @@ -105,7 +105,12 @@ fw3_load_rules(struct fw3_state *state, struct uci_package *p) rule->enabled = true; - fw3_parse_options(rule, fw3_rule_opts, s); + if (!fw3_parse_options(rule, fw3_rule_opts, s)) + { + warn_elem(e, "skipped due to invalid options"); + fw3_free_rule(rule); + continue; + } if (!rule->enabled) {