naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone
36cfb7
From 46ce82dd840a158c8fe80842ac808b1df425e216 Mon Sep 17 00:00:00 2001
36cfb7
From: Andrea Claudi <aclaudi@redhat.com>
36cfb7
Date: Wed, 5 Jun 2019 13:10:31 +0200
36cfb7
Subject: [PATCH] tc: gact: fix control action parsing
36cfb7
36cfb7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1714660
36cfb7
Upstream Status: iproute2.git commit 18f05d06016d9
36cfb7
Conflicts: context change due to out-of-order cherry-pick of
36cfb7
           commit 73aa988868e7e ("tc/m_gact: Drop dead code")
36cfb7
36cfb7
commit 18f05d06016d9492c87fd105d831de0d6d858f43
36cfb7
Author: Jiri Pirko <jiri@mellanox.com>
36cfb7
Date:   Mon Jun 5 16:22:03 2017 +0200
36cfb7
36cfb7
    tc: gact: fix control action parsing
36cfb7
36cfb7
    parse_action_control helper does advancing of the arg inside. So don't
36cfb7
    do it outside.
36cfb7
36cfb7
    Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions")
36cfb7
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
36cfb7
---
36cfb7
 tc/m_gact.c | 2 --
36cfb7
 1 file changed, 2 deletions(-)
36cfb7
36cfb7
diff --git a/tc/m_gact.c b/tc/m_gact.c
36cfb7
index c04c00bbded3c..73346d4e9333b 100644
36cfb7
--- a/tc/m_gact.c
36cfb7
+++ b/tc/m_gact.c
36cfb7
@@ -113,8 +113,6 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p,
36cfb7
 			if (parse_action_control(&argc, &argv,
36cfb7
 						 &pp.paction, false) == -1)
36cfb7
 				usage();
36cfb7
-			argc--;
36cfb7
-			argv++;
36cfb7
 			if (get_u16(&pp.pval, *argv, 10)) {
36cfb7
 				fprintf(stderr, "Illegal probability val 0x%x\n", pp.pval);
36cfb7
 				return -1;
36cfb7
-- 
e138d9
2.21.0
36cfb7