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