aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_cli.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-07-16 06:19:35 -0700
committerNeale Ranns <nranns@cisco.com>2019-07-16 15:05:10 +0000
commit41afb33efe81a93ddf5879138802bf23602ccc81 (patch)
treec0a8f8b7866d58379e35fd5b57057b86b780115a /src/vnet/ipsec/ipsec_cli.c
parent37dab437be1331e40f6f3e63f52235655431f65f (diff)
ipsec: handle UDP keepalives
Type: feature Change-Id: I87cc1168466f267e8c4bbec318401982f4bdf03a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec_cli.c')
-rw-r--r--src/vnet/ipsec/ipsec_cli.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index a5972bbf2c1..a7a6c0c0d5b 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -942,6 +942,58 @@ VLIB_CLI_COMMAND (ipsec_tun_protect_show_node, static) =
};
/* *INDENT-ON* */
+static clib_error_t *
+ipsec_tun_protect_hash_show (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ ipsec_main_t *im = &ipsec_main;
+
+ {
+ ipsec_tun_lkup_result_t value;
+ ipsec4_tunnel_key_t key;
+
+ vlib_cli_output (vm, "IPv4:");
+
+ /* *INDENT-OFF* */
+ hash_foreach(key.as_u64, value.as_u64, im->tun4_protect_by_key,
+ ({
+ vlib_cli_output (vm, " %U", format_ipsec4_tunnel_key, &key);
+ vlib_cli_output (vm, " tun:%d sa:%d", value.tun_index, value.sa_index);
+ }));
+ /* *INDENT-ON* */
+ }
+
+ {
+ ipsec_tun_lkup_result_t value;
+ ipsec6_tunnel_key_t *key;
+
+ vlib_cli_output (vm, "IPv6:");
+
+ /* *INDENT-OFF* */
+ hash_foreach_mem(key, value.as_u64, im->tun6_protect_by_key,
+ ({
+ vlib_cli_output (vm, " %U", format_ipsec6_tunnel_key, key);
+ vlib_cli_output (vm, " tun:%d sa:%d", value.tun_index, value.sa_index);
+ }));
+ /* *INDENT-ON* */
+ }
+
+ return NULL;
+}
+
+/**
+ * show IPSEC tunnel protection hash tables
+ */
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (ipsec_tun_protect_hash_show_node, static) =
+{
+ .path = "show ipsec protect-hash",
+ .function = ipsec_tun_protect_hash_show,
+ .short_help = "show ipsec protect-hash",
+};
+/* *INDENT-ON* */
+
clib_error_t *
ipsec_cli_init (vlib_main_t * vm)
{