diff options
author | laforge <laforge> | 2001-07-05 06:29:10 +0000 |
---|---|---|
committer | laforge <laforge> | 2001-07-05 06:29:10 +0000 |
commit | 2951d5dc52666543ba05b7738c292ff37f6bd7e1 (patch) | |
tree | f381f5285d692a24dbe7e086bbd42d1f8b9f258a /ip6tables-save.c | |
parent | 56c97295409d3c0bb617cc5501f039eb745a2e06 (diff) |
ip6tables-save without target fix, scoreboard
Diffstat (limited to 'ip6tables-save.c')
-rw-r--r-- | ip6tables-save.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ip6tables-save.c b/ip6tables-save.c index 4af811a..d8b15c3 100644 --- a/ip6tables-save.c +++ b/ip6tables-save.c @@ -155,6 +155,7 @@ static void print_rule(const struct ip6t_entry *e, ip6tc_handle_t *h, int counters) { struct ip6t_entry_target *t; + const char *target_name; /* print counters */ if (counters) @@ -196,7 +197,9 @@ static void print_rule(const struct ip6t_entry *e, } /* Print target name */ - printf("-j %s ", ip6tc_get_target(e, h)); + target_name = ip6tc_get_target(e, h); + if (target_name && *target_name != '\0') + printf("-j %s ", ip6tc_get_target(e, h)); /* Print targinfo part */ t = ip6t_get_target((struct ip6t_entry *)e); |