aboutsummaryrefslogtreecommitdiffstats
path: root/tc
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2019-05-20 11:56:52 +0200
committerStephen Hemminger <stephen@networkplumber.org>2019-05-22 11:51:31 -0700
commit6eccf7ecdb010a90e5271942748ef4338ddb61ae (patch)
treea78c3a40defae9b1c174ae9e6857f166f9405b0f /tc
parentcd35c954234eb8773192ea8a503f4fcf76e2aa83 (diff)
downloadiproute2-6eccf7ecdb010a90e5271942748ef4338ddb61ae.tar.gz
m_mirred: don't bail if the control action is missing
The mirred act admits an optional control action, defaulting to TC_ACT_PIPE. The parsing code currently emits an error message if the control action is not provided on the command line, even if the command itself completes with no error. This change shuts down the error message, using the appropriate parsing helper. Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'tc')
-rw-r--r--tc/m_mirred.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tc/m_mirred.c b/tc/m_mirred.c
index c7f7318b8..23ba638a2 100644
--- a/tc/m_mirred.c
+++ b/tc/m_mirred.c
@@ -202,7 +202,8 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR)
- parse_action_control(&argc, &argv, &p.action, false);
+ parse_action_control_dflt(&argc, &argv, &p.action, false,
+ TC_ACT_PIPE);
if (argc) {
if (iok && matches(*argv, "index") == 0) {