ip6tables-save without target fix, scoreboard
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 @@
ip6tc_handle_t *h, int counters)
{
struct ip6t_entry_target *t;
+ const char *target_name;
/* print counters */
if (counters)
@@ -196,7 +197,9 @@
}
/* 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);