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

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