Message ID | 20230227184510.277561-4-pctammela@mojatatu.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 7375ab684228cab7f909b84b94a007cd59f99453 |
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 Mon, 27 Feb 2023 15:45:10 -0300
Pedro Tammela <pctammela@mojatatu.com> wrote:
> Fixes: fc2d0206 ("Add NAT action")
In future use more characters for fixes line. Current checkpatch
complains:
WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: fc2d02069b52 ("Add NAT action")'
#426:
Fixes: fc2d0206 ("Add NAT action")
diff --git a/tc/m_nat.c b/tc/m_nat.c index 58315125..95b35584 100644 --- a/tc/m_nat.c +++ b/tc/m_nat.c @@ -88,7 +88,9 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct while (argc > 0) { if (matches(*argv, "nat") == 0) { NEXT_ARG(); - if (parse_nat_args(&argc, &argv, &sel)) { + if (strcmp(*argv, "index") == 0) { + goto skip_args; + } else if (parse_nat_args(&argc, &argv, &sel)) { fprintf(stderr, "Illegal nat construct (%s)\n", *argv); explain(); @@ -113,6 +115,7 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct if (argc) { if (matches(*argv, "index") == 0) { +skip_args: NEXT_ARG(); if (get_u32(&sel.index, *argv, 10)) { fprintf(stderr, "Nat: Illegal \"index\"\n");