laurenceman / rpms / iptables

Forked from rpms/iptables 5 years ago
Clone

Blame SOURCES/0049-arptables-Support-set-counters-option.patch

029dc7
From a4412aa91dff87ab27e4ad6e27f2a6c03ed0b5fb Mon Sep 17 00:00:00 2001
029dc7
From: Phil Sutter <phil@nwl.cc>
029dc7
Date: Thu, 22 Nov 2018 20:50:13 +0100
029dc7
Subject: [PATCH] arptables: Support --set-counters option
029dc7
029dc7
Relevant code for this was already present (short option '-c'), just the
029dc7
long option definition was missing.
029dc7
029dc7
While being at it, add '-c' to help text.
029dc7
029dc7
Signed-off-by: Phil Sutter <phil@nwl.cc>
029dc7
Signed-off-by: Florian Westphal <fw@strlen.de>
029dc7
(cherry picked from commit b0466ae6fbc0a93b69591171c54aa79063e23f3d)
029dc7
Signed-off-by: Phil Sutter <psutter@redhat.com>
029dc7
---
029dc7
 iptables/xtables-arp.c | 3 ++-
029dc7
 1 file changed, 2 insertions(+), 1 deletion(-)
029dc7
029dc7
diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
029dc7
index 18cdced627c55..85bcc841b21f5 100644
029dc7
--- a/iptables/xtables-arp.c
029dc7
+++ b/iptables/xtables-arp.c
029dc7
@@ -144,6 +144,7 @@ static struct option original_opts[] = {
029dc7
 	{ "help", 2, 0, 'h' },
029dc7
 	{ "line-numbers", 0, 0, '0' },
029dc7
 	{ "modprobe", 1, 0, 'M' },
029dc7
+	{ "set-counters", 1, 0, 'c' },
029dc7
 	{ 0 }
029dc7
 };
029dc7
 
029dc7
@@ -481,7 +482,7 @@ exit_printhelp(void)
029dc7
 "  --line-numbers		print line numbers when listing\n"
029dc7
 "  --exact	-x		expand numbers (display exact values)\n"
029dc7
 "  --modprobe=<command>		try to insert modules using this command\n"
029dc7
-"  --set-counters PKTS BYTES	set the counter during insert/append\n"
029dc7
+"  --set-counters -c PKTS BYTES	set the counter during insert/append\n"
029dc7
 "[!] --version	-V		print package version.\n");
029dc7
 	printf(" opcode strings: \n");
029dc7
         for (i = 0; i < NUMOPCODES; i++)
029dc7
-- 
029dc7
2.21.0
029dc7