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

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