]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - tc/m_mirred.c
tc: fix parsing of the control action
[mirror_iproute2.git] / tc / m_mirred.c
index aa7ce6d923cce233801933827bc911e7c17eb879..14e5c88d44d539fecae0ab0ea5e23f92c8b3e1bc 100644 (file)
@@ -103,6 +103,7 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
        while (argc > 0) {
 
                if (matches(*argv, "action") == 0) {
+                       NEXT_ARG();
                        break;
                } else if (!egress && matches(*argv, "egress") == 0) {
                        egress = 1;
@@ -202,10 +203,8 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
        }
 
 
-       if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) {
+       if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR)
                parse_action_control(&argc, &argv, &p.action, false);
-               NEXT_ARG_FWD();
-       }
 
        if (argc) {
                if (iok && matches(*argv, "index") == 0) {