From 182abe47ae4686944482580b42a972827a0e4b51 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 4 Jun 2013 12:12:26 +0200 Subject: [PATCH] Fix wrong chain emitted for zone forward policy, the terminal chain is source, not destination bound. --- zones.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.11.0