From: Jo-Philipp Wich Date: Tue, 4 Jun 2013 10:12:26 +0000 (+0200) Subject: Fix wrong chain emitted for zone forward policy, the terminal chain is source, not... X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=182abe47ae4686944482580b42a972827a0e4b51;p=oweals%2Ffirewall3.git Fix wrong chain emitted for zone forward policy, the terminal chain is source, not destination bound. --- diff --git a/zones.c b/zones.c index 4de6625..9f1a68d 100644 --- a/zones.c +++ b/zones.c @@ -222,12 +222,12 @@ fw3_load_zones(struct fw3_state *state, struct uci_package *p) } setbit(zone->flags[0], fw3_to_src_target(zone->policy_input)); + setbit(zone->flags[0], fw3_to_src_target(zone->policy_forward)); setbit(zone->flags[0], zone->policy_output); - setbit(zone->flags[0], zone->policy_forward); setbit(zone->flags[1], fw3_to_src_target(zone->policy_input)); + setbit(zone->flags[1], fw3_to_src_target(zone->policy_forward)); setbit(zone->flags[1], zone->policy_output); - setbit(zone->flags[1], zone->policy_forward); list_add_tail(&zone->list, &state->zones); } @@ -476,7 +476,7 @@ print_zone_rule(struct fw3_ipt_handle *handle, struct fw3_state *state, fw3_ipt_rule_append(r, "zone_%s_input", zone->name); r = fw3_ipt_rule_new(handle); - fw3_ipt_rule_target(r, "zone_%s_dest_%s", zone->name, + fw3_ipt_rule_target(r, "zone_%s_src_%s", zone->name, fw3_flag_names[zone->policy_forward]); fw3_ipt_rule_append(r, "zone_%s_forward", zone->name);