diff options
author | Arthur de Kerhor <arthurdekerhor@gmail.com> | 2021-04-12 08:16:56 -0700 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-04-28 07:39:42 +0000 |
commit | a80ff1384cdcc1b3bd766f7fc504e7f3af4134e7 (patch) | |
tree | de3ac7a9242ed0f2dd4a26d337e6973867317ea0 /src/vnet | |
parent | e3f078fcfc76d465552f0a0343a1886f4d177dd0 (diff) |
ip: extend the punt cli to accept reason filter for sockets registration
Type: improvement
Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
Change-Id: I769db1213b0936abbf304bc6cf9dbcfbbebf06aa
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/ip/punt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ip/punt.c b/src/vnet/ip/punt.c index 6fb8dd58776..fb0cc221950 100644 --- a/src/vnet/ip/punt.c +++ b/src/vnet/ip/punt.c @@ -581,6 +581,9 @@ punt_socket_register_cmd (vlib_main_t * vm, pr.punt.l4.port = ~0; else if (unformat (input, "socket %s", &socket_name)) ; + else if (unformat (input, "reason %U", unformat_punt_reason, + &pr.punt.exception.reason)) + pr.type = PUNT_TYPE_EXCEPTION; else { error = clib_error_return (0, "parse error: '%U'", @@ -652,6 +655,9 @@ punt_socket_deregister_cmd (vlib_main_t * vm, ; else if (unformat (input, "all")) pr.punt.l4.port = ~0; + else if (unformat (input, "reason %U", unformat_punt_reason, + &pr.punt.exception.reason)) + pr.type = PUNT_TYPE_EXCEPTION; else { error = clib_error_return (0, "parse error: '%U'", |