tc: add support for TRAP action

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
This commit is contained in:
Jiri Pirko 2017-06-05 16:39:45 +02:00 committed by Stephen Hemminger
parent 18f05d0601
commit d5ebd6fdde
1 changed files with 3 additions and 0 deletions

View 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;