naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/0134-tc-gact-fix-control-action-parsing.patch

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