[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4340721b2347c9290d2e379ee22b3a1a05083eb6.1603357855.git.gnault@redhat.com>
Date: Thu, 22 Oct 2020 11:11:44 +0200
From: Guillaume Nault <gnault@...hat.com>
To: David Ahern <dsahern@...il.com>
Cc: netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
martin.varghese@...ia.com
Subject: [PATCH iproute2-next] m_mpls: test the 'mac_push' action after
'modify'
Commit 02a261b5ba1c ("m_mpls: add mac_push action") added a matches()
test for the "mac_push" string before the test for "modify".
This changes the previous behaviour as 'action m' used to match
"modify" while it now matches "mac_push".
Revert to the original behaviour by moving the "mac_push" test after
"modify".
Fixes: 02a261b5ba1c ("m_mpls: add mac_push action")
Signed-off-by: Guillaume Nault <gnault@...hat.com>
---
tc/m_mpls.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tc/m_mpls.c b/tc/m_mpls.c
index cb8019b1..2c3752ba 100644
--- a/tc/m_mpls.c
+++ b/tc/m_mpls.c
@@ -99,14 +99,14 @@ static int parse_mpls(struct action_util *a, int *argc_p, char ***argv_p,
if (check_double_action(action, *argv))
return -1;
action = TCA_MPLS_ACT_PUSH;
- } else if (matches(*argv, "mac_push") == 0) {
- if (check_double_action(action, *argv))
- return -1;
- action = TCA_MPLS_ACT_MAC_PUSH;
} else if (matches(*argv, "modify") == 0) {
if (check_double_action(action, *argv))
return -1;
action = TCA_MPLS_ACT_MODIFY;
+ } else if (matches(*argv, "mac_push") == 0) {
+ if (check_double_action(action, *argv))
+ return -1;
+ action = TCA_MPLS_ACT_MAC_PUSH;
} else if (matches(*argv, "dec_ttl") == 0) {
if (check_double_action(action, *argv))
return -1;
--
2.21.3
Powered by blists - more mailing lists