/*
* 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
if (strcmp(s->type, "include"))
continue;
- include = malloc(sizeof(*include));
-
+ include = calloc(1, sizeof(*include));
if (!include)
continue;
- memset(include, 0, sizeof(*include));
-
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)
{