m_mpls: test the 'mac_push' action after 'modify'
Commit02a261b5ba("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:02a261b5ba("m_mpls: add mac_push action") Signed-off-by: Guillaume Nault <gnault@redhat.com> Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
2b7a768408
commit
f1298d7660
|
|
@ -99,14 +99,14 @@ static int parse_mpls(struct action_util *a, int *argc_p, char ***argv_p,
|
||||||
if (check_double_action(action, *argv))
|
if (check_double_action(action, *argv))
|
||||||
return -1;
|
return -1;
|
||||||
action = TCA_MPLS_ACT_PUSH;
|
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) {
|
} else if (matches(*argv, "modify") == 0) {
|
||||||
if (check_double_action(action, *argv))
|
if (check_double_action(action, *argv))
|
||||||
return -1;
|
return -1;
|
||||||
action = TCA_MPLS_ACT_MODIFY;
|
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) {
|
} else if (matches(*argv, "dec_ttl") == 0) {
|
||||||
if (check_double_action(action, *argv))
|
if (check_double_action(action, *argv))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue