diff mbox

conntrack: Rename option --protonum to --proto.

Message ID 1459891918-2283-1-git-send-email-mart.frauenlob@chello.at
State Not Applicable
Delegated to: Pablo Neira
Headers show

Commit Message

Mart Frauenlob April 5, 2016, 9:31 p.m. UTC
Usage shows --protonum, while the man page talks about --proto.
Should be --proto in usage too. --protonum remains valid,
but is marked deprecated in source.

Signed-off-by: Mart Frauenlob <mart.frauenlob@chello.at>
---
 src/conntrack.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Comments

Pablo Neira Ayuso April 7, 2016, 9:42 a.m. UTC | #1
On Tue, Apr 05, 2016 at 11:31:58PM +0200, Mart Frauenlob wrote:
> Usage shows --protonum, while the man page talks about --proto.
> Should be --proto in usage too. --protonum remains valid,
> but is marked deprecated in source.

You better fix the manpage. Please, don't unnecessarily deprecate
things. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mart Frauenlob April 7, 2016, 5:26 p.m. UTC | #2
On 07.04.2016 11:42, Pablo Neira Ayuso wrote:
> On Tue, Apr 05, 2016 at 11:31:58PM +0200, Mart Frauenlob wrote:
>> Usage shows --protonum, while the man page talks about --proto.
>> Should be --proto in usage too. --protonum remains valid,
>> but is marked deprecated in source.
>
> You better fix the manpage. Please, don't unnecessarily deprecate
> things. Thanks.
>

ok, I'll update docs to show both.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/conntrack.c b/src/conntrack.c
index 076d8a3..7a286eb 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -286,7 +286,7 @@  static const char *optflags[NUMBER_OF_OPT] = {
 	[CT_OPT_ORIG_DST_BIT]	= "orig-dst",
 	[CT_OPT_REPL_SRC_BIT]	= "reply-src",
 	[CT_OPT_REPL_DST_BIT]	= "reply-dst",
-	[CT_OPT_PROTO_BIT]	= "protonum",
+	[CT_OPT_PROTO_BIT]	= "proto",
 	[CT_OPT_TIMEOUT_BIT]	= "timeout",
 	[CT_OPT_STATUS_BIT]	= "status",
 	[CT_OPT_ZERO_BIT]	= "zero",
@@ -331,7 +331,8 @@  static struct option original_opts[] = {
 	{"dst", 1, 0, 'd'},
 	{"reply-src", 1, 0, 'r'},
 	{"reply-dst", 1, 0, 'q'},
-	{"protonum", 1, 0, 'p'},
+	{"proto", 1, 0, 'p'},
+	{"protonum", 1, 0, 'p'},	/* deprecated */
 	{"timeout", 1, 0, 't'},
 	{"status", 1, 0, 'u'},
 	{"zero", 0, 0, 'z'},
@@ -551,7 +552,7 @@  static const char usage_parameters[] =
 	"  -d, --orig-dst ip\t\tDestination address from original direction\n"
 	"  -r, --reply-src ip\t\tSource addres from reply direction\n"
 	"  -q, --reply-dst ip\t\tDestination address from reply direction\n"
-	"  -p, --protonum proto\t\tLayer 4 Protocol, eg. 'tcp'\n"
+	"  -p, --proto proto\t\tLayer 4 Protocol, eg. 'tcp'\n"
 	"  -f, --family proto\t\tLayer 3 Protocol, eg. 'ipv6'\n"
 	"  -t, --timeout timeout\t\tSet timeout\n"
 	"  -u, --status status\t\tSet status, eg. ASSURED\n"