Message ID | 20230224181130.187328-2-pctammela@mojatatu.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Stephen Hemminger |
Headers | show |
Series | tc: parse index argument correctly | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On Fri, 24 Feb 2023 15:11:28 -0300 Pedro Tammela <pctammela@mojatatu.com> wrote: > + if (matches(*argv, "index") == 0) { > + goto skip_args; No new uses of matches allowed in iproute2 commands.
diff --git a/tc/m_csum.c b/tc/m_csum.c index ba1e3e33..ca74427a 100644 --- a/tc/m_csum.c +++ b/tc/m_csum.c @@ -94,7 +94,9 @@ parse_csum(struct action_util *a, int *argc_p, while (argc > 0) { if (matches(*argv, "csum") == 0) { NEXT_ARG(); - if (parse_csum_args(&argc, &argv, &sel)) { + if (matches(*argv, "index") == 0) { + goto skip_args; + } else if (parse_csum_args(&argc, &argv, &sel)) { fprintf(stderr, "Illegal csum construct (%s)\n", *argv); explain(); @@ -123,6 +125,7 @@ parse_csum(struct action_util *a, int *argc_p, if (argc) { if (matches(*argv, "index") == 0) { +skip_args: NEXT_ARG(); if (get_u32(&sel.index, *argv, 10)) { fprintf(stderr, "Illegal \"index\" (%s) <csum>\n",