Blame SOURCES/arptables-0.0.4-set-counters-option.patch

c42007
commit ba6234638d04400cf94adf350ccfa7005d078b4a
c42007
Author: Jesper Dangaard Brouer <brouer@redhat.com>
c42007
Date:   Sun Mar 2 22:08:30 2014 +0100
c42007
c42007
    arptables: add missing long option --set-counters and update documentation
c42007
c42007
    The long option "--set-counters" where missing in option parsing.
c42007
    And the corresponding short option "-c" were not mentioned in
c42007
    the help usage text.
c42007
c42007
    Also update the arptables man page with a description
c42007
    of the parameter.
c42007
c42007
    Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
c42007
c42007
diff --git a/userspace/arptables/arptables.8 b/userspace/arptables/arptables.8
c42007
index 0b6b62e1a7ef..78b2c60978c4 100644
c42007
--- a/userspace/arptables/arptables.8
c42007
+++ b/userspace/arptables/arptables.8
c42007
@@ -215,6 +215,14 @@ The target of the rule. This is one of the following values:
c42007
 a target extension (see
c42007
 .BR "TARGET EXTENSIONS" ")"
c42007
 or a user-defined chain name.
c42007
+.TP
c42007
+.BI "-c, --set-counters " "PKTS BYTES"
c42007
+This enables the administrator to initialize the packet and byte
c42007
+counters of a rule (during
c42007
+.B INSERT,
c42007
+.B APPEND,
c42007
+.B REPLACE
c42007
+operations).
c42007
 
c42007
 .SS RULE-SPECIFICATIONS
c42007
 The following command line arguments make up a rule specification (as used 
c42007
diff --git a/userspace/arptables/arptables.c b/userspace/arptables/arptables.c
c42007
index 4da6fea980bb..3fb8ed5c40e7 100644
c42007
--- a/userspace/arptables/arptables.c
c42007
+++ b/userspace/arptables/arptables.c
c42007
@@ -152,6 +152,7 @@ static struct option original_opts[] = {
c42007
 	{ "help", 2, 0, 'h' },
c42007
 	{ "line-numbers", 0, 0, '0' },
c42007
 	{ "modprobe", 1, 0, 'M' },
c42007
+	{ "set-counters", 1, 0, 'c' },
c42007
 	{ 0 }
c42007
 };
c42007
 
c42007
@@ -529,7 +530,7 @@ exit_printhelp(void)
c42007
 "  --line-numbers		print line numbers when listing\n"
c42007
 "  --exact	-x		expand numbers (display exact values)\n"
c42007
 "  --modprobe=<command>		try to insert modules using this command\n"
c42007
-"  --set-counters PKTS BYTES	set the counter during insert/append\n"
c42007
+"  --set-counters -c PKTS BYTES	set the counter during insert/append\n"
c42007
 "[!] --version	-V		print package version.\n");
c42007
 	printf(" opcode strings: \n");
c42007
         for (i = 0; i < NUMOPCODES; i++)