]>
Commit | Line | Data |
---|---|---|
6046ff0b WB |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
3 | Date: Mon, 29 Jan 2018 11:50:55 +0100 | |
4 | Subject: [PATCH iproute2] police: don't skip parameters after actions | |
5 | ||
6 | The 'parse_action_control()' helper advances the argument | |
7 | pointers to past its parsed action already, so don't | |
8 | advance it further in 'act_parse_polic()'. | |
9 | ||
10 | Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") | |
11 | Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
12 | --- | |
13 | tc/m_police.c | 4 +++- | |
14 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
15 | ||
16 | diff --git a/tc/m_police.c b/tc/m_police.c | |
17 | index ff1dcb7d..f0878b3a 100644 | |
18 | --- a/tc/m_police.c | |
19 | +++ b/tc/m_police.c | |
20 | @@ -154,6 +154,7 @@ int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p, | |
21 | matches(*argv, "goto") == 0) { | |
22 | if (parse_action_control(&argc, &argv, &p.action, false)) | |
23 | return -1; | |
24 | + goto keep_arg; | |
25 | } else if (strcmp(*argv, "conform-exceed") == 0) { | |
26 | NEXT_ARG(); | |
27 | if (parse_action_control_slash(&argc, &argv, &p.action, | |
28 | @@ -174,8 +175,9 @@ int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p, | |
29 | } else { | |
30 | break; | |
31 | } | |
32 | - ok++; | |
33 | argc--; argv++; | |
34 | +keep_arg: | |
35 | + ok++; | |
36 | } | |
37 | ||
38 | if (!ok) | |
39 | -- | |
40 | 2.11.0 | |
41 |