naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

Blame SOURCES/0007-tc-mpls-fix-manpage-example-and-help-message-string.patch

26f871
From 8953735b551d5f3c18c9523ea24055f4a7f9b927 Mon Sep 17 00:00:00 2001
26f871
Message-Id: <8953735b551d5f3c18c9523ea24055f4a7f9b927.1611877215.git.aclaudi@redhat.com>
26f871
In-Reply-To: <cb7ce51cc1abd7b98370b903ec96205ebfe48661.1611877215.git.aclaudi@redhat.com>
26f871
References: <cb7ce51cc1abd7b98370b903ec96205ebfe48661.1611877215.git.aclaudi@redhat.com>
26f871
From: Andrea Claudi <aclaudi@redhat.com>
26f871
Date: Fri, 29 Jan 2021 00:35:03 +0100
26f871
Subject: [PATCH] tc-mpls: fix manpage example and help message string
26f871
26f871
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1885770
26f871
Upstream Status: unknown commit 8682f588
26f871
26f871
commit 8682f588bfed7862233a22626562696d662ca60c
26f871
Author: Guillaume Nault <gnault@redhat.com>
26f871
Date:   Mon Nov 2 12:24:25 2020 +0100
26f871
26f871
    tc-mpls: fix manpage example and help message string
26f871
26f871
    Manpage:
26f871
     * Remove the extra "and to ip packets" part from command description
26f871
       to make it more understandable.
26f871
26f871
     * Redirect packets to eth1, instead of eth0, as told in the
26f871
       description.
26f871
26f871
    Help string:
26f871
     * "mpls pop" can be followed by a CONTROL keyword.
26f871
26f871
     * "mpls modify" can also set the MPLS_BOS field.
26f871
26f871
    Signed-off-by: Guillaume Nault <gnault@redhat.com>
26f871
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
26f871
---
26f871
 man/man8/tc-mpls.8 | 6 +++---
26f871
 tc/m_mpls.c        | 5 +++--
26f871
 2 files changed, 6 insertions(+), 5 deletions(-)
26f871
26f871
diff --git a/man/man8/tc-mpls.8 b/man/man8/tc-mpls.8
26f871
index 9e563e98..7f8be221 100644
26f871
--- a/man/man8/tc-mpls.8
26f871
+++ b/man/man8/tc-mpls.8
26f871
@@ -147,15 +147,15 @@ a label 123 and sends them out eth1:
26f871
 .EE
26f871
 .RE
26f871
 
26f871
-In this example, incoming MPLS unicast packets on eth0 are decapsulated and to
26f871
-ip packets and output to eth1:
26f871
+In this example, incoming MPLS unicast packets on eth0 are decapsulated
26f871
+and redirected to eth1:
26f871
 
26f871
 .RS
26f871
 .EX
26f871
 #tc qdisc add dev eth0 handle ffff: ingress
26f871
 #tc filter add dev eth0 protocol mpls_uc parent ffff: flower \\
26f871
 	action mpls pop protocol ipv4  \\
26f871
-	action mirred egress redirect dev eth0
26f871
+	action mirred egress redirect dev eth1
26f871
 .EE
26f871
 .RE
26f871
 
26f871
diff --git a/tc/m_mpls.c b/tc/m_mpls.c
26f871
index 2c3752ba..9fee22e3 100644
26f871
--- a/tc/m_mpls.c
26f871
+++ b/tc/m_mpls.c
26f871
@@ -23,12 +23,13 @@ static const char * const action_names[] = {
26f871
 static void explain(void)
26f871
 {
26f871
 	fprintf(stderr,
26f871
-		"Usage: mpls pop [ protocol MPLS_PROTO ]\n"
26f871
+		"Usage: mpls pop [ protocol MPLS_PROTO ] [CONTROL]\n"
26f871
 		"       mpls push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
26f871
 		"                 [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
26f871
 		"       mpls mac_push [ protocol MPLS_PROTO ] [ label MPLS_LABEL ] [ tc MPLS_TC ]\n"
26f871
 		"                     [ ttl MPLS_TTL ] [ bos MPLS_BOS ] [CONTROL]\n"
26f871
-		"       mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ] [CONTROL]\n"
26f871
+		"       mpls modify [ label MPLS_LABEL ] [ tc MPLS_TC ] [ ttl MPLS_TTL ]\n"
26f871
+		"                   [ bos MPLS_BOS ] [CONTROL]\n"
26f871
 		"           for pop, MPLS_PROTO is next header of packet - e.g. ip or mpls_uc\n"
26f871
 		"           for push and mac_push, MPLS_PROTO is one of mpls_uc or mpls_mc\n"
26f871
 		"               with default: mpls_uc\n"
26f871
-- 
26f871
2.29.2
26f871