From e43e3cc546ef1d79ca2125e2381662bf9501ccd4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 13 Jun 2013 14:46:17 +0200 Subject: [PATCH] Properly handle reject target in rules with specific destination --- rules.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 2.25.1