netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Giuseppe Longo <giuseppelng@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables-nftables PATCH 2/2] xtables: arp: zeroing chain counters
Date: Tue, 24 Sep 2013 13:19:15 +0200	[thread overview]
Message-ID: <20130924111915.GB8523@localhost> (raw)
In-Reply-To: <1379837936-2813-2-git-send-email-giuseppelng@gmail.com>

On Sun, Sep 22, 2013 at 10:18:56AM +0200, Giuseppe Longo wrote:
> This small patch permit to reset the chain counters.

Applied with minor change.

> Signed-off-by: Giuseppe Longo <giuseppelng@gmail.com>
> ---
>  iptables/xtables-arp.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
> index 4537a58..2f43ce8 100644
> --- a/iptables/xtables-arp.c
> +++ b/iptables/xtables-arp.c
> @@ -1462,9 +1462,8 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table)
>  				   options&OPT_NUMERIC,
>  				   /*options&OPT_EXPANDED*/0,
>  				   options&OPT_LINENUMBERS);
> -		/*if (ret)
> -			ret = zero_entries(chain,
> -						options&OPT_VERBOSE, handle);*/
> +		if (ret && (command & CMD_ZERO))
                        ^---------------------^

that seems redundant, we already checked for this above.

Mangled and applied, thanks.

  reply	other threads:[~2013-09-24 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22  8:18 [iptables-nftables PATCH 1/2] xtables: arp: add delete operation Giuseppe Longo
2013-09-22  8:18 ` [iptables-nftables PATCH 2/2] xtables: arp: zeroing chain counters Giuseppe Longo
2013-09-24 11:19   ` Pablo Neira Ayuso [this message]
2013-09-24 11:18 ` [iptables-nftables PATCH 1/2] xtables: arp: add delete operation Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130924111915.GB8523@localhost \
    --to=pablo@netfilter.org \
    --cc=giuseppelng@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).