The return value of fw3_parse_options() should be checked.
Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
continue;
}
- fw3_parse_options(&state->defaults, fw3_flag_opts, s);
+ if(!fw3_parse_options(&state->defaults, fw3_flag_opts, s))
+ warn_elem(e, "has invalid options");
check_policy(e, &defs->policy_input, "input");
check_policy(e, &defs->policy_output, "output");
forward->enabled = true;
- fw3_parse_options(forward, fw3_forward_opts, s);
+ if (!fw3_parse_options(forward, fw3_forward_opts, s))
+ warn_elem(e, "has invalid options");
if (!forward->enabled)
{
include->name = e->name;
include->enabled = true;
- fw3_parse_options(include, fw3_include_opts, s);
+ if (!fw3_parse_options(include, fw3_include_opts, s))
+ warn_elem(e, "has invalid options");
if (!include->enabled)
{
if (!ipset)
continue;
- fw3_parse_options(ipset, fw3_ipset_opts, s);
+ if (!fw3_parse_options(ipset, fw3_ipset_opts, s))
+ warn_elem(e, "has invalid options");
if (ipset->external)
{
if (!zone)
continue;
- fw3_parse_options(zone, fw3_zone_opts, s);
+ if (!fw3_parse_options(zone, fw3_zone_opts, s))
+ warn_elem(e, "has invalid options");
if (!zone->enabled)
{