naccyde / rpms / iproute

Forked from rpms/iproute 8 months ago
Clone

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

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