|
|
0890d3 |
From 81f722a8a632ab2e0a50861d8505d460447bf5d7 Mon Sep 17 00:00:00 2001
|
|
|
0890d3 |
From: Jesper Dangaard Brouer <brouer@redhat.com>
|
|
|
0890d3 |
Date: Sun, 2 Mar 2014 22:08:30 +0100
|
|
|
0890d3 |
Subject: [PATCH] arptables: add missing long option --set-counters and update
|
|
|
0890d3 |
documentation
|
|
|
0890d3 |
|
|
|
0890d3 |
(cherry picked from commit 9fcaf703f93658ec0ae2ae1013b191a76835b94a)
|
|
|
0890d3 |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
0890d3 |
---
|
|
|
0890d3 |
arptables.8 | 8 ++++++++
|
|
|
0890d3 |
arptables.c | 3 ++-
|
|
|
0890d3 |
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
0890d3 |
|
|
|
0890d3 |
diff --git a/arptables.8 b/arptables.8
|
|
|
0890d3 |
index 0b6b62e1a7efd..78b2c60978c40 100644
|
|
|
0890d3 |
--- a/arptables.8
|
|
|
0890d3 |
+++ b/arptables.8
|
|
|
0890d3 |
@@ -215,6 +215,14 @@ The target of the rule. This is one of the following values:
|
|
|
0890d3 |
a target extension (see
|
|
|
0890d3 |
.BR "TARGET EXTENSIONS" ")"
|
|
|
0890d3 |
or a user-defined chain name.
|
|
|
0890d3 |
+.TP
|
|
|
0890d3 |
+.BI "-c, --set-counters " "PKTS BYTES"
|
|
|
0890d3 |
+This enables the administrator to initialize the packet and byte
|
|
|
0890d3 |
+counters of a rule (during
|
|
|
0890d3 |
+.B INSERT,
|
|
|
0890d3 |
+.B APPEND,
|
|
|
0890d3 |
+.B REPLACE
|
|
|
0890d3 |
+operations).
|
|
|
0890d3 |
|
|
|
0890d3 |
.SS RULE-SPECIFICATIONS
|
|
|
0890d3 |
The following command line arguments make up a rule specification (as used
|
|
|
0890d3 |
diff --git a/arptables.c b/arptables.c
|
|
|
0890d3 |
index 4da6fea980bb9..3fb8ed5c40e73 100644
|
|
|
0890d3 |
--- a/arptables.c
|
|
|
0890d3 |
+++ b/arptables.c
|
|
|
0890d3 |
@@ -152,6 +152,7 @@ static struct option original_opts[] = {
|
|
|
0890d3 |
{ "help", 2, 0, 'h' },
|
|
|
0890d3 |
{ "line-numbers", 0, 0, '0' },
|
|
|
0890d3 |
{ "modprobe", 1, 0, 'M' },
|
|
|
0890d3 |
+ { "set-counters", 1, 0, 'c' },
|
|
|
0890d3 |
{ 0 }
|
|
|
0890d3 |
};
|
|
|
0890d3 |
|
|
|
0890d3 |
@@ -529,7 +530,7 @@ exit_printhelp(void)
|
|
|
0890d3 |
" --line-numbers print line numbers when listing\n"
|
|
|
0890d3 |
" --exact -x expand numbers (display exact values)\n"
|
|
|
0890d3 |
" --modprobe=<command> try to insert modules using this command\n"
|
|
|
0890d3 |
-" --set-counters PKTS BYTES set the counter during insert/append\n"
|
|
|
0890d3 |
+" --set-counters -c PKTS BYTES set the counter during insert/append\n"
|
|
|
0890d3 |
"[!] --version -V print package version.\n");
|
|
|
0890d3 |
printf(" opcode strings: \n");
|
|
|
0890d3 |
for (i = 0; i < NUMOPCODES; i++)
|
|
|
0890d3 |
--
|
|
|
0890d3 |
2.21.0
|
|
|
0890d3 |
|