X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fikev2%2Fikev2_cli.c;h=72f82b4e135ef5e318a3eae6d55de3e5fc2056f0;hb=d7fc12f07;hp=c948578eb230b1e0c3ef6318ed3956c4c6342eaf;hpb=84962d19ba76eafd5c7658aa86ec61c9b81f7702;p=vpp.git diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c index c948578eb23..72f82b4e135 100644 --- a/src/plugins/ikev2/ikev2_cli.c +++ b/src/plugins/ikev2/ikev2_cli.c @@ -14,9 +14,7 @@ */ #include #include -#include #include -#include #include #include #include @@ -249,6 +247,23 @@ VLIB_CLI_COMMAND (show_ikev2_sa_command, static) = { }; /* *INDENT-ON* */ +static clib_error_t * +ikev2_disable_dpd_command_fn (vlib_main_t * vm, + unformat_input_t * input, + vlib_cli_command_t * cmd) +{ + ikev2_disable_dpd (); + return 0; +} + +/* *INDENT-OFF* */ +VLIB_CLI_COMMAND (ikev2_cli_disable_dpd_command, static) = { + .path = "ikev2 dpd disable", + .short_help = "ikev2 dpd disable", + .function = ikev2_disable_dpd_command_fn, +}; +/* *INDENT-ON* */ + static uword unformat_ikev2_token (unformat_input_t * input, va_list * va) { @@ -495,6 +510,12 @@ ikev2_profile_add_del_command_fn (vlib_main_t * vm, r = clib_error_return (0, "Error: %U", format_vnet_api_errno, rv); goto done; } + else if (unformat (line_input, "set %U disable natt", + unformat_ikev2_token, &name)) + { + r = ikev2_profile_natt_disable (name); + goto done; + } else break; } @@ -526,7 +547,8 @@ VLIB_CLI_COMMAND (ikev2_profile_add_del_command, static) = { "ikev2 profile set ike-crypto-alg ike-integ-alg ike-dh \n" "ikev2 profile set esp-crypto-alg " "[esp-integ-alg ]\n" - "ikev2 profile set sa-lifetime ", + "ikev2 profile set sa-lifetime " + "ikev2 profile set disable natt\n", .function = ikev2_profile_add_del_command_fn, }; /* *INDENT-ON* */ @@ -611,6 +633,9 @@ show_ikev2_profile_command_fn (vlib_main_t * vm, if (p->udp_encap) vlib_cli_output(vm, " udp-encap"); + if (p->natt_disabled) + vlib_cli_output(vm, " NAT-T disabled"); + if (p->ipsec_over_udp_port != IPSEC_UDP_PORT_NONE) vlib_cli_output(vm, " ipsec-over-udp port %d", p->ipsec_over_udp_port); @@ -777,7 +802,7 @@ VLIB_CLI_COMMAND (ikev2_initiate_command, static) = { "ikev2 initiate sa-init \n" "ikev2 initiate del-child-sa \n" "ikev2 initiate del-sa \n" - "ikev2 initiate rekey-child-sa \n", + "ikev2 initiate rekey-child-sa \n", .function = ikev2_initiate_command_fn, }; /* *INDENT-ON* */