]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: add support for TRAP action
authorJiri Pirko <jiri@mellanox.com>
Mon, 5 Jun 2017 14:39:45 +0000 (16:39 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 8 Jun 2017 18:03:12 +0000 (11:03 -0700)
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
tc/tc_util.c

index 4f7283d047c852985192fcf0d79938d85ed760e2..5a0f96aa5562ed7c375ffa9db58316760737ac3a 100644 (file)
@@ -430,6 +430,8 @@ static const char *action_n2a(int action)
                return "pipe";
        case TC_ACT_STOLEN:
                return "stolen";
+       case TC_ACT_TRAP:
+               return "trap";
        default:
                snprintf(buf, 64, "%d", action);
                buf[63] = '\0';
@@ -462,6 +464,7 @@ static int action_a2n(char *arg, int *result, bool allow_num)
                {"reclassify", TC_ACT_RECLASSIFY},
                {"pipe", TC_ACT_PIPE},
                {"goto", TC_ACT_GOTO_CHAIN},
+               {"trap", TC_ACT_TRAP},
                { NULL },
        }, *iter;