Blame SOURCES/0138-m_mirred-don-t-bail-if-the-control-action-is-missing.patch

99be8f
From e4526cbbfb6151e87e493a7fecfe2384a3751100 Mon Sep 17 00:00:00 2001
99be8f
From: Andrea Claudi <aclaudi@redhat.com>
99be8f
Date: Wed, 5 Jun 2019 13:12:49 +0200
99be8f
Subject: [PATCH] m_mirred: don't bail if the control action is missing
99be8f
99be8f
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1714660
99be8f
Upstream Status: iproute2.git commit 6eccf7ecdb010
99be8f
99be8f
commit 6eccf7ecdb010a90e5271942748ef4338ddb61ae
99be8f
Author: Paolo Abeni <pabeni@redhat.com>
99be8f
Date:   Mon May 20 11:56:52 2019 +0200
99be8f
99be8f
    m_mirred: don't bail if the control action is missing
99be8f
99be8f
    The mirred act admits an optional control action, defaulting
99be8f
    to TC_ACT_PIPE. The parsing code currently emits an error message
99be8f
    if the control action is not provided on the command line, even
99be8f
    if the command itself completes with no error.
99be8f
99be8f
    This change shuts down the error message, using the appropriate
99be8f
    parsing helper.
99be8f
99be8f
    Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions")
99be8f
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
99be8f
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
99be8f
---
99be8f
 tc/m_mirred.c | 3 ++-
99be8f
 1 file changed, 2 insertions(+), 1 deletion(-)
99be8f
99be8f
diff --git a/tc/m_mirred.c b/tc/m_mirred.c
99be8f
index b1f45f1e6ecb0..90d0b633c1318 100644
99be8f
--- a/tc/m_mirred.c
99be8f
+++ b/tc/m_mirred.c
99be8f
@@ -172,7 +172,8 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
99be8f
 
99be8f
 
99be8f
 	if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR)
99be8f
-		parse_action_control(&argc, &argv, &p.action, false);
99be8f
+		parse_action_control_dflt(&argc, &argv, &p.action, false,
99be8f
+					  TC_ACT_PIPE);
99be8f
 
99be8f
 	if (argc) {
99be8f
 		if (iok && matches(*argv, "index") == 0) {
99be8f
-- 
99be8f
2.20.1
99be8f