lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f03210e3683cf99c58ed847a6abbe48eb021479d.1612201006.git.gnault@redhat.com>
Date:   Mon, 1 Feb 2021 18:44:07 +0100
From:   Guillaume Nault <gnault@...hat.com>
To:     Stephen Hemminger <stephen@...workplumber.org>
Cc:     netdev@...r.kernel.org
Subject: [PATCH v2 iproute2] iplink_bareudp: cleanup help message and man page

 * Fix PROTO description in help message (mpls isn't a valid argument).

 * Remove SRCPORTMIN description from help message since it doesn't
   appear in the syntax string.

 * Use same keywords in help message and in man page.

 * Use the "ethertype" option name (.B ethertype) rather than the
   option value (.I ETHERTYPE) in the man page description of
   [no]multiproto.

Signed-off-by: Guillaume Nault <gnault@...hat.com>
---
No changes since v1.
Reposting since v1 appears neither in lore.kernel.org nor in patchwork.

 ip/iplink_bareudp.c   |  8 +++++---
 man/man8/ip-link.8.in | 15 +++++++++------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/ip/iplink_bareudp.c b/ip/iplink_bareudp.c
index 860ec699..aa311106 100644
--- a/ip/iplink_bareudp.c
+++ b/ip/iplink_bareudp.c
@@ -22,9 +22,11 @@ static void print_explain(FILE *f)
 		"		[ srcportmin PORT ]\n"
 		"		[ [no]multiproto ]\n"
 		"\n"
-		"Where:	PORT       := 0-65535\n"
-		"	PROTO      := NUMBER | ip | mpls\n"
-		"	SRCPORTMIN := 0-65535\n"
+		"Where:	PORT  := UDP_PORT\n"
+		"	PROTO := ETHERTYPE\n"
+		"\n"
+		"Note: ETHERTYPE can be given as number or as protocol name (\"ipv4\", \"ipv6\",\n"
+		"      \"mpls_uc\", etc.).\n"
 	);
 }
 
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index 3516765a..fd67e611 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -1307,9 +1307,9 @@ For a link of type
 the following additional arguments are supported:
 
 .BI "ip link add " DEVICE
-.BI type " bareudp " dstport " PORT " ethertype " ETHERTYPE"
+.BI type " bareudp " dstport " PORT " ethertype " PROTO"
 [
-.BI srcportmin " SRCPORTMIN "
+.BI srcportmin " PORT "
 ] [
 .RB [ no ] multiproto
 ]
@@ -1320,11 +1320,14 @@ the following additional arguments are supported:
 - specifies the destination port for the UDP tunnel.
 
 .sp
-.BI ethertype " ETHERTYPE"
+.BI ethertype " PROTO"
 - specifies the ethertype of the L3 protocol being tunnelled.
+.B ethertype
+can be given as plain Ethernet protocol number or using the protocol name
+("ipv4", "ipv6", "mpls_uc", etc.).
 
 .sp
-.BI srcportmin " SRCPORTMIN"
+.BI srcportmin " PORT"
 - selects the lowest value of the UDP tunnel source port range.
 
 .sp
@@ -1332,11 +1335,11 @@ the following additional arguments are supported:
 - activates support for protocols similar to the one
 .RB "specified by " ethertype .
 When
-.I ETHERTYPE
+.B ethertype
 is "mpls_uc" (that is, unicast MPLS), this allows the tunnel to also handle
 multicast MPLS.
 When
-.I ETHERTYPE
+.B ethertype
 is "ipv4", this allows the tunnel to also handle IPv6. This option is disabled
 by default.
 
-- 
2.21.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ