From: Giuseppe Longo <giuseppelng@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Giuseppe Longo <giuseppelng@gmail.com>
Subject: [iptables-nftables PATCH 2/2] xtables: arp: zeroing chain counters
Date: Sun, 22 Sep 2013 10:18:56 +0200 [thread overview]
Message-ID: <1379837936-2813-2-git-send-email-giuseppelng@gmail.com> (raw)
In-Reply-To: <1379837936-2813-1-git-send-email-giuseppelng@gmail.com>
This small patch permit to reset the chain counters.
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))
+ ret = nft_chain_zero_counters(h, chain, *table);
break;
case CMD_NEW_CHAIN:
ret = nft_chain_user_add(h, chain, *table);
--
1.7.8.6
next prev parent reply other threads:[~2013-09-22 8: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 ` Giuseppe Longo [this message]
2013-09-24 11:19 ` [iptables-nftables PATCH 2/2] xtables: arp: zeroing chain counters Pablo Neira Ayuso
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=1379837936-2813-2-git-send-email-giuseppelng@gmail.com \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.