From: Jo-Philipp Wich Date: Thu, 13 Jun 2013 12:46:17 +0000 (+0200) Subject: Properly handle reject target in rules with specific destination X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e43e3cc546ef1d79ca2125e2381662bf9501ccd4;p=oweals%2Ffirewall3.git Properly handle reject target in rules with specific destination --- diff --git a/rules.c b/rules.c index 4750af7..1a4473b 100644 --- a/rules.c +++ b/rules.c @@ -295,7 +295,7 @@ static void set_target(struct fw3_ipt_rule *r, struct fw3_rule *rule) break; default: - name = "reject"; + name = fw3_flag_names[FW3_FLAG_REJECT]; break; } @@ -303,8 +303,10 @@ static void set_target(struct fw3_ipt_rule *r, struct fw3_rule *rule) fw3_ipt_rule_target(r, "zone_%s_dest_%s", rule->dest.name, name); else if (need_src_action_chain(rule)) fw3_ipt_rule_target(r, "zone_%s_src_%s", rule->src.name, name); - else + else if (strcmp(name, "REJECT")) fw3_ipt_rule_target(r, name); + else + fw3_ipt_rule_target(r, "reject"); } static void