firewall3: check the return value of fw3_parse_options()
[project/firewall3.git] / includes.c
index e2450a8..a2b37a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * firewall3 - 3rd OpenWrt UCI firewall implementation
  *
- *   Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ *   Copyright (C) 2013 Jo-Philipp Wich <jo@mein.io>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -54,7 +54,8 @@ fw3_load_includes(struct fw3_state *state, struct uci_package *p)
                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)
                {