Message ID | 20230227184510.277561-3-pctammela@mojatatu.com (mailing list archive) |
---|---|
State | Accepted |
Commit | af6fd6b84554f2972a88fbb612e9d856e19174e4 |
Delegated to: | Stephen Hemminger |
Headers | show |
Series | tc: parse index argument correctly | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
diff --git a/tc/m_mpls.c b/tc/m_mpls.c index 9b39d853..dda46805 100644 --- a/tc/m_mpls.c +++ b/tc/m_mpls.c @@ -91,6 +91,9 @@ static int parse_mpls(struct action_util *a, int *argc_p, char ***argv_p, NEXT_ARG(); + if (strcmp(*argv, "index") == 0) + goto skip_args; + while (argc > 0) { if (matches(*argv, "pop") == 0) { if (check_double_action(action, *argv)) @@ -164,6 +167,7 @@ static int parse_mpls(struct action_util *a, int *argc_p, char ***argv_p, if (argc) { if (matches(*argv, "index") == 0) { +skip_args: NEXT_ARG(); if (get_u32(&parm.index, *argv, 10)) invarg("illegal index", *argv);