From e5c8c87ce6e9423f1445020440e715ea9f9fc466 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 18 Nov 2013 12:37:30 +0000 Subject: [PATCH] Skip rules with invalid options --- rules.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) { -- 2.25.1