naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0010-iplink_bareudp-cleanup-help-message-and-man-page.patch

ed38cb
From e5143d1e2787fca4ea365c4010e0da5bcbbbba36 Mon Sep 17 00:00:00 2001
ed38cb
Message-Id: <e5143d1e2787fca4ea365c4010e0da5bcbbbba36.1615575079.git.aclaudi@redhat.com>
ed38cb
In-Reply-To: <cb7ce51cc1abd7b98370b903ec96205ebfe48661.1615575079.git.aclaudi@redhat.com>
ed38cb
References: <cb7ce51cc1abd7b98370b903ec96205ebfe48661.1615575079.git.aclaudi@redhat.com>
ed38cb
From: Andrea Claudi <aclaudi@redhat.com>
ed38cb
Date: Mon, 8 Mar 2021 12:52:23 +0100
ed38cb
Subject: [PATCH] iplink_bareudp: cleanup help message and man page
ed38cb
ed38cb
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1912412
ed38cb
Upstream Status: unknown commit 86d9660d
ed38cb
ed38cb
commit 86d9660dc1805be4435497ff194f618535e8fc97
ed38cb
Author: Guillaume Nault <gnault@redhat.com>
ed38cb
Date:   Mon Feb 1 18:44:07 2021 +0100
ed38cb
ed38cb
    iplink_bareudp: cleanup help message and man page
ed38cb
ed38cb
    * Fix PROTO description in help message (mpls isn't a valid argument).
ed38cb
ed38cb
     * Remove SRCPORTMIN description from help message since it doesn't
ed38cb
       appear in the syntax string.
ed38cb
ed38cb
     * Use same keywords in help message and in man page.
ed38cb
ed38cb
     * Use the "ethertype" option name (.B ethertype) rather than the
ed38cb
       option value (.I ETHERTYPE) in the man page description of
ed38cb
       [no]multiproto.
ed38cb
ed38cb
    Signed-off-by: Guillaume Nault <gnault@redhat.com>
ed38cb
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ed38cb
---
ed38cb
 ip/iplink_bareudp.c   |  8 +++++---
ed38cb
 man/man8/ip-link.8.in | 15 +++++++++------
ed38cb
 2 files changed, 14 insertions(+), 9 deletions(-)
ed38cb
ed38cb
diff --git a/ip/iplink_bareudp.c b/ip/iplink_bareudp.c
ed38cb
index 860ec699..aa311106 100644
ed38cb
--- a/ip/iplink_bareudp.c
ed38cb
+++ b/ip/iplink_bareudp.c
ed38cb
@@ -22,9 +22,11 @@ static void print_explain(FILE *f)
ed38cb
 		"		[ srcportmin PORT ]\n"
ed38cb
 		"		[ [no]multiproto ]\n"
ed38cb
 		"\n"
ed38cb
-		"Where:	PORT       := 0-65535\n"
ed38cb
-		"	PROTO      := NUMBER | ip | mpls\n"
ed38cb
-		"	SRCPORTMIN := 0-65535\n"
ed38cb
+		"Where:	PORT  := UDP_PORT\n"
ed38cb
+		"	PROTO := ETHERTYPE\n"
ed38cb
+		"\n"
ed38cb
+		"Note: ETHERTYPE can be given as number or as protocol name (\"ipv4\", \"ipv6\",\n"
ed38cb
+		"      \"mpls_uc\", etc.).\n"
ed38cb
 	);
ed38cb
 }
ed38cb
 
ed38cb
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
ed38cb
index f451ecf3..ce3c8636 100644
ed38cb
--- a/man/man8/ip-link.8.in
ed38cb
+++ b/man/man8/ip-link.8.in
ed38cb
@@ -1304,9 +1304,9 @@ For a link of type
ed38cb
 the following additional arguments are supported:
ed38cb
 
ed38cb
 .BI "ip link add " DEVICE
ed38cb
-.BI type " bareudp " dstport " PORT " ethertype " ETHERTYPE"
ed38cb
+.BI type " bareudp " dstport " PORT " ethertype " PROTO"
ed38cb
 [
ed38cb
-.BI srcportmin " SRCPORTMIN "
ed38cb
+.BI srcportmin " PORT "
ed38cb
 ] [
ed38cb
 .RB [ no ] multiproto
ed38cb
 ]
ed38cb
@@ -1317,11 +1317,14 @@ the following additional arguments are supported:
ed38cb
 - specifies the destination port for the UDP tunnel.
ed38cb
 
ed38cb
 .sp
ed38cb
-.BI ethertype " ETHERTYPE"
ed38cb
+.BI ethertype " PROTO"
ed38cb
 - specifies the ethertype of the L3 protocol being tunnelled.
ed38cb
+.B ethertype
ed38cb
+can be given as plain Ethernet protocol number or using the protocol name
ed38cb
+("ipv4", "ipv6", "mpls_uc", etc.).
ed38cb
 
ed38cb
 .sp
ed38cb
-.BI srcportmin " SRCPORTMIN"
ed38cb
+.BI srcportmin " PORT"
ed38cb
 - selects the lowest value of the UDP tunnel source port range.
ed38cb
 
ed38cb
 .sp
ed38cb
@@ -1329,11 +1332,11 @@ the following additional arguments are supported:
ed38cb
 - activates support for protocols similar to the one
ed38cb
 .RB "specified by " ethertype .
ed38cb
 When
ed38cb
-.I ETHERTYPE
ed38cb
+.B ethertype
ed38cb
 is "mpls_uc" (that is, unicast MPLS), this allows the tunnel to also handle
ed38cb
 multicast MPLS.
ed38cb
 When
ed38cb
-.I ETHERTYPE
ed38cb
+.B ethertype
ed38cb
 is "ipv4", this allows the tunnel to also handle IPv6. This option is disabled
ed38cb
 by default.
ed38cb
 
ed38cb
-- 
ed38cb
2.30.2
ed38cb