From patchwork Sat Nov 17 22:05:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Eastep X-Patchwork-Id: 199875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CE7C32C0086 for ; Sun, 18 Nov 2012 09:12:29 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193Ab2KQWM2 (ORCPT ); Sat, 17 Nov 2012 17:12:28 -0500 Received: from lists.shorewall.net ([70.90.191.124]:41620 "EHLO lists.shorewall.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186Ab2KQWM1 (ORCPT ); Sat, 17 Nov 2012 17:12:27 -0500 X-Greylist: delayed 379 seconds by postgrey-1.27 at vger.kernel.org; Sat, 17 Nov 2012 17:12:27 EST Received: from mac.shorewall.net (unknown [IPv6:2001:470:b:787:3c80:7eaa:7175:ac9f]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.shorewall.net (Postfix) with ESMTPSA id 2E17E64E051 for ; Sat, 17 Nov 2012 14:06:08 -0800 (PST) Message-ID: <50A80A47.6010700@shorewall.net> Date: Sat, 17 Nov 2012 14:05:59 -0800 From: Tom Eastep User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Netfilter Developer Mailing List Subject: [PATCH] Correct libxt_statistic save output X-Enigmail-Version: 1.4.5 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org 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(-) } 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;