From: Mohit Mehta <mohit.mehta@vyatta.com>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] iptables: expose option to zero packet and byte counters for a specific rule using iptables/ip6tables
Date: Wed, 18 Feb 2009 12:32:01 -0800 (PST) [thread overview]
Message-ID: <9174114.31441234989121915.JavaMail.root@tahiti.vyatta.com> (raw)
In-Reply-To: <alpine.LSU.2.00.0902182118520.12329@fbirervta.pbzchgretzou.qr>
>If you have trouble generating patches quickly, I can suggest the
>use of the following tools:
> - quilt
> (quilt new mywork.diff; quilt edit iptables.c; quilt ref;
> grab patch from patches/ directory)
> - git
> (git clone; edit files; git add; git commit; git-export-patch)
> - or git with stgit
> (stg new mywork.diff; edit; stg ref; stg export...)
Thanks for these suggestions.
It should be noted that I did these changes to the latest source that I grabbed
from debian sid. May be I should have just git cloned it from iptables repository.
let me knw if these aren't any good and I'll patch em against the most current version of iptables.
----- Original Message -----
From: "Jan Engelhardt" <jengelh@medozas.de>
To: "Mohit Mehta" <mohit.mehta@vyatta.com>
Cc: "Patrick McHardy" <kaber@trash.net>, netfilter-devel@vger.kernel.org
Sent: Wednesday, February 18, 2009 12:22:05 PM (GMT-0800) Auto-Detected
Subject: Re: [PATCH] iptables: expose option to zero packet and byte counters for a specific rule using iptables/ip6tables
On Wednesday 2009-02-18 21:17, Mohit Mehta wrote:
>> Please rediff your patch against the current tree.
>
>diff for iptables.c -
If you have trouble generating patches quickly, I can suggest the
use of the following tools:
- quilt
(quilt new mywork.diff; quilt edit iptables.c; quilt ref;
grab patch from patches/ directory)
- git
(git clone; edit files; git add; git commit; git-export-patch)
- or git with stgit
(stg new mywork.diff; edit; stg ref; stg export...)
>@@ -2116,6 +2131,8 @@ int do_command(int argc, char *argv[], c
> if (ret && (command & CMD_ZERO))
> ret = zero_entries(chain,
> options&OPT_VERBOSE, handle);
>+ if (ret && (command & CMD_ZERO_NUM))
>+ ret = iptc_zero_counter(chain, rulenum, handle);
> break;
> case CMD_NEW_CHAIN:
> ret = iptc_create_chain(chain, handle);
>
>
>
>
>
>
>diff for ip6tables.c -
>
>--- ip6tables.c.orig 2009-02-18 11:44:04.000000000 -0800
>+++ ip6tables.c 2009-02-18 11:50:51.000000000 -0800
>@@ -79,9 +79,10 @@
> #define CMD_SET_POLICY 0x0400U
> #define CMD_RENAME_CHAIN 0x0800U
> #define CMD_LIST_RULES 0x1000U
>-#define NUMBER_OF_CMD 14
>+#define CMD_ZERO_NUM 0x2000U
>+#define NUMBER_OF_CMD 15
> static const char cmdflags[] = { 'I', 'D', 'D', 'R', 'A', 'L', 'F', 'Z',
>- 'N', 'X', 'P', 'E', 'S' };
>+ 'Z', 'N', 'X', 'P', 'E', 'S' };
>
> #define OPTION_OFFSET 256
>
next prev parent reply other threads:[~2009-02-18 20:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <13574679.27071234914513480.JavaMail.root@tahiti.vyatta.com>
2009-02-17 23:51 ` [PATCH] iptables: expose option to zero packet and byte counters for a specific rule using iptables/ip6tables Mohit Mehta
2009-02-18 18:40 ` Patrick McHardy
2009-02-18 20:17 ` Mohit Mehta
2009-02-18 20:22 ` Jan Engelhardt
2009-02-18 20:32 ` Mohit Mehta [this message]
2009-02-19 10:21 ` Patrick McHardy
2009-02-19 19:41 ` Mohit Mehta
2009-02-19 20:11 ` Patrick McHardy
2009-08-19 17:56 ` Mohit Mehta
2009-08-19 20:41 ` Jan Engelhardt
2009-09-10 14:26 ` Jan Engelhardt
2009-09-10 16:24 ` Mohit Mehta
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=9174114.31441234989121915.JavaMail.root@tahiti.vyatta.com \
--to=mohit.mehta@vyatta.com \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--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).