summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Eastep <teastep@shorewall.net>2012-11-19 11:40:40 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-11-19 11:41:35 +0100
commita46a5698027aa48e27e3cc2d54bb8bbafb10e7da (patch)
treecc604fef82fe4e3031c815faa3a4a2fb50f0c3d9
parent9d284c1c67188dfa8a4c7a6e36eb9a10bd9c15e2 (diff)
extensions: libxt_statistic: Fix save output
Suppressing '--packet 0' in save output resulted in restore failure. This patch includes '--packet 0' in save output while continuing to suppress it in print output. Signed-off-by: Tom Eastep <teastep@shorewall.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--extensions/libxt_statistic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/libxt_statistic.c b/extensions/libxt_statistic.c
index 12a83dd8..c23805fb 100644
--- a/extensions/libxt_statistic.c
+++ b/extensions/libxt_statistic.c
@@ -107,7 +107,7 @@ static void print_match(const struct xt_statistic_info *info, char *prefix)
(info->flags & XT_STATISTIC_INVERT) ? " !" : "",
prefix,
info->u.nth.every + 1);
- if (info->u.nth.packet)
+ if (info->u.nth.packet || *prefix)
printf(" %spacket %u", prefix, info->u.nth.packet);
break;
}