]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
m_mirred: don't bail if the control action is missing
authorPaolo Abeni <pabeni@redhat.com>
Mon, 20 May 2019 09:56:52 +0000 (11:56 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 22 May 2019 18:51:31 +0000 (11:51 -0700)
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>
tc/m_mirred.c

index c7f7318b8413ffc0f6b2d0efef1d63bfb4ba565c..23ba638a234d17f5503695f2405d35ed76189466 100644 (file)
@@ -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) {