Blob Blame History Raw
From 81f722a8a632ab2e0a50861d8505d460447bf5d7 Mon Sep 17 00:00:00 2001
From: Jesper Dangaard Brouer <brouer@redhat.com>
Date: Sun, 2 Mar 2014 22:08:30 +0100
Subject: [PATCH] arptables: add missing long option --set-counters and update
 documentation

(cherry picked from commit 9fcaf703f93658ec0ae2ae1013b191a76835b94a)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
 arptables.8 | 8 ++++++++
 arptables.c | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arptables.8 b/arptables.8
index 0b6b62e1a7efd..78b2c60978c40 100644
--- a/arptables.8
+++ b/arptables.8
@@ -215,6 +215,14 @@ The target of the rule. This is one of the following values:
 a target extension (see
 .BR "TARGET EXTENSIONS" ")"
 or a user-defined chain name.
+.TP
+.BI "-c, --set-counters " "PKTS BYTES"
+This enables the administrator to initialize the packet and byte
+counters of a rule (during
+.B INSERT,
+.B APPEND,
+.B REPLACE
+operations).
 
 .SS RULE-SPECIFICATIONS
 The following command line arguments make up a rule specification (as used 
diff --git a/arptables.c b/arptables.c
index 4da6fea980bb9..3fb8ed5c40e73 100644
--- a/arptables.c
+++ b/arptables.c
@@ -152,6 +152,7 @@ static struct option original_opts[] = {
 	{ "help", 2, 0, 'h' },
 	{ "line-numbers", 0, 0, '0' },
 	{ "modprobe", 1, 0, 'M' },
+	{ "set-counters", 1, 0, 'c' },
 	{ 0 }
 };
 
@@ -529,7 +530,7 @@ exit_printhelp(void)
 "  --line-numbers		print line numbers when listing\n"
 "  --exact	-x		expand numbers (display exact values)\n"
 "  --modprobe=<command>		try to insert modules using this command\n"
-"  --set-counters PKTS BYTES	set the counter during insert/append\n"
+"  --set-counters -c PKTS BYTES	set the counter during insert/append\n"
 "[!] --version	-V		print package version.\n");
 	printf(" opcode strings: \n");
         for (i = 0; i < NUMOPCODES; i++)
-- 
2.21.0