X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=defaults.c;h=85a3750a52c6e6bcfc9ee12b424d44ac946f8041;hp=4936b3879616fa5f9b539d80428319c1f2e6dce1;hb=6039c7f4b0052c4da21520cdd604f04a5a67f50d;hpb=60f144464444f50be936bf3ed1de2a903d9ded0a diff --git a/defaults.c b/defaults.c index 4936b38..85a3750 100644 --- a/defaults.c +++ b/defaults.c @@ -1,7 +1,7 @@ /* * firewall3 - 3rd OpenWrt UCI firewall implementation * - * Copyright (C) 2013 Jo-Philipp Wich + * Copyright (C) 2013 Jo-Philipp Wich * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -107,7 +107,8 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p) 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"); @@ -154,7 +155,7 @@ fw3_print_default_chains(struct fw3_ipt_handle *handle, struct fw3_state *state, continue; if (c->flag && - !hasbit(defs->flags[handle->family == FW3_FAMILY_V6], c->flag)) + !fw3_hasbit(defs->flags[handle->family == FW3_FAMILY_V6], c->flag)) continue; fw3_ipt_create_chain(handle, c->format); @@ -163,13 +164,6 @@ fw3_print_default_chains(struct fw3_ipt_handle *handle, struct fw3_state *state, set(defs->flags, handle->family, handle->table); } - -struct toplevel_rule { - enum fw3_table table; - const char *chain; - const char *target; -}; - void fw3_print_default_head_rules(struct fw3_ipt_handle *handle, struct fw3_state *state, bool reload)