diff options
author | laforge <laforge> | 2001-05-24 23:22:28 +0000 |
---|---|---|
committer | laforge <laforge> | 2001-05-24 23:22:28 +0000 |
commit | d3d66fb992dac9a790aed5ecd03af8ceb1ec4a1b (patch) | |
tree | de470b02c8ec9c1658744028a0bf2c7fc61a45ac /iptables-save.c | |
parent | c36904f779afba8aa846bec3a32fadc50f8daafb (diff) |
A. van Schie: bug report "iptables-save doesn't save fall-through rules correctly"
Diffstat (limited to 'iptables-save.c')
-rw-r--r-- | iptables-save.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/iptables-save.c b/iptables-save.c index 282ca7f..11ee3e3 100644 --- a/iptables-save.c +++ b/iptables-save.c @@ -148,6 +148,7 @@ static void print_rule(const struct ipt_entry *e, iptc_handle_t *h, const char *chain, int counters) { struct ipt_entry_target *t; + char *target_name; /* print counters */ if (counters) @@ -181,7 +182,9 @@ static void print_rule(const struct ipt_entry *e, } /* Print target name */ - printf("-j %s ", iptc_get_target(e, h)); + target_name = iptc_get_target(e, h); + if (target_name && (*target_name != '\0')) + printf("-j %s ", target_name); /* Print targinfo part */ t = ipt_get_target((struct ipt_entry *)e); |