X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fikev2%2Fikev2_cli.c;h=2a5ebb3b6a256b069b70cd2c391d6c7163dfec56;hb=96dabc69abbd7cfb761f286bdc925e6ee030ebdb;hp=03f9efd696f25878182e2a47e82e94b1ab7aeab0;hpb=e5d34919b4561a5ee11e41dec6b0184537b39696;p=vpp.git diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c index 03f9efd696f..2a5ebb3b6a2 100644 --- a/src/plugins/ikev2/ikev2_cli.c +++ b/src/plugins/ikev2/ikev2_cli.c @@ -512,8 +512,8 @@ show_ikev2_profile_command_fn (vlib_main_t * vm, if (p->udp_encap) vlib_cli_output(vm, " udp-encap"); - if (p->dst_port != IPSEC_UDP_PORT_NONE) - vlib_cli_output(vm, " ipsec-over-udp port %d", p->dst_port); + if (p->ipsec_over_udp_port != IPSEC_UDP_PORT_NONE) + vlib_cli_output(vm, " ipsec-over-udp port %d", p->ipsec_over_udp_port); })); /* *INDENT-ON* */ @@ -528,6 +528,45 @@ VLIB_CLI_COMMAND (show_ikev2_profile_command, static) = { }; /* *INDENT-ON* */ +static clib_error_t * +set_ikev2_liveness_period_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + unformat_input_t _line_input, *line_input = &_line_input; + clib_error_t *r = 0; + u32 period = 0, max_retries = 0; + + if (!unformat_user (input, unformat_line_input, line_input)) + return 0; + + while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT) + { + if (unformat (line_input, "%d %d", &period, &max_retries)) + { + r = ikev2_set_liveness_params (period, max_retries); + goto done; + } + else + break; + } + + r = clib_error_return (0, "parse error: '%U'", + format_unformat_error, line_input); + +done: + unformat_free (line_input); + return r; +} + +/* *INDENT-OFF* */ +VLIB_CLI_COMMAND (set_ikev2_liveness_command, static) = { + .path = "ikev2 set liveness", + .short_help = "ikev2 set liveness ", + .function = set_ikev2_liveness_period_fn, +}; +/* *INDENT-ON* */ + static clib_error_t * set_ikev2_local_key_command_fn (vlib_main_t * vm, unformat_input_t * input, @@ -644,7 +683,7 @@ ikev2_set_log_level_command_fn (vlib_main_t * vm, vlib_cli_command_t * cmd) { unformat_input_t _line_input, *line_input = &_line_input; - u8 log_level = IKEV2_LOG_NONE; + u32 log_level = IKEV2_LOG_NONE; clib_error_t *error = 0; /* Get a line of input. */