diff mbox

Correct libxt_statistic save output

Message ID 50A80A47.6010700@shorewall.net
State Accepted
Headers show

Commit Message

Tom Eastep Nov. 17, 2012, 10:05 p.m. UTC
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.
---
 extensions/libxt_statistic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 	}

Comments

Pablo Neira Ayuso Nov. 19, 2012, 10:44 a.m. UTC | #1
On Sat, Nov 17, 2012 at 02:05:59PM -0800, Tom Eastep wrote:
> 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.

Applied, thanks Tom!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/extensions/libxt_statistic.c b/extensions/libxt_statistic.c
index 12a83dd..3a6632d 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;