]> git.proxmox.com Git - iproute2.git/commitdiff
fix #1637: merge: police: don't skip parameters after actions
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 29 Jan 2018 10:55:42 +0000 (11:55 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 29 Jan 2018 10:56:20 +0000 (11:56 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
debian/patches/0006-police-don-t-skip-parameters-after-actions.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0006-police-don-t-skip-parameters-after-actions.patch b/debian/patches/0006-police-don-t-skip-parameters-after-actions.patch
new file mode 100644 (file)
index 0000000..0a0f2c3
--- /dev/null
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bumiller <w.bumiller@proxmox.com>
+Date: Mon, 29 Jan 2018 11:50:55 +0100
+Subject: [PATCH iproute2] police: don't skip parameters after actions
+
+The 'parse_action_control()' helper advances the argument
+pointers to past its parsed action already, so don't
+advance it further in 'act_parse_polic()'.
+
+Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions")
+Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
+---
+ tc/m_police.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tc/m_police.c b/tc/m_police.c
+index ff1dcb7d..f0878b3a 100644
+--- a/tc/m_police.c
++++ b/tc/m_police.c
+@@ -154,6 +154,7 @@ int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p,
+                          matches(*argv, "goto") == 0) {
+                       if (parse_action_control(&argc, &argv, &p.action, false))
+                               return -1;
++                      goto keep_arg;
+               } else if (strcmp(*argv, "conform-exceed") == 0) {
+                       NEXT_ARG();
+                       if (parse_action_control_slash(&argc, &argv, &p.action,
+@@ -174,8 +175,9 @@ int act_parse_police(struct action_util *a, int *argc_p, char ***argv_p,
+               } else {
+                       break;
+               }
+-              ok++;
+               argc--; argv++;
++keep_arg:
++              ok++;
+       }
+       if (!ok)
+-- 
+2.11.0
+
index 7e61765e21098bf85ccf24d199ad23309f5f82f5..86046a5ee009951f1c0004a6575ea5bbd43b8c52 100644 (file)
@@ -2,3 +2,4 @@
 0002-txtdocs.patch
 0004-sync-iptables-header.patch
 0005-tc-lexer-let-quotes-actually-start-strings.patch
 0002-txtdocs.patch
 0004-sync-iptables-header.patch
 0005-tc-lexer-let-quotes-actually-start-strings.patch
+0006-police-don-t-skip-parameters-after-actions.patch