summaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2_cli.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-10-30 04:47:44 +0000
committerFilip Tehlar <ftehlar@cisco.com>2020-10-31 02:58:24 +0000
commitd7fc12f07313f9147159f2562f6fcc928af7a963 (patch)
treeb890f17a30d8fde4faca0efdedb1e81bb55e8bd1 /src/plugins/ikev2/ikev2_cli.c
parent68ad6258374201ba8f0dc052e6f44d6250555249 (diff)
ikev2: add option to disable NAT traversal
Type: feature Ticket: VPP-1935 Change-Id: I705f84047b112279377590157a1c7b4a34f693d2 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/ikev2/ikev2_cli.c')
-rw-r--r--src/plugins/ikev2/ikev2_cli.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c
index b0de9409a56..72f82b4e135 100644
--- a/src/plugins/ikev2/ikev2_cli.c
+++ b/src/plugins/ikev2/ikev2_cli.c
@@ -510,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;
}
@@ -541,7 +547,8 @@ VLIB_CLI_COMMAND (ikev2_profile_add_del_command, static) = {
"ikev2 profile set <id> ike-crypto-alg <crypto alg> <key size> ike-integ-alg <integ alg> ike-dh <dh type>\n"
"ikev2 profile set <id> esp-crypto-alg <crypto alg> <key size> "
"[esp-integ-alg <integ alg>]\n"
- "ikev2 profile set <id> sa-lifetime <seconds> <jitter> <handover> <max bytes>",
+ "ikev2 profile set <id> sa-lifetime <seconds> <jitter> <handover> <max bytes>"
+ "ikev2 profile set <id> disable natt\n",
.function = ikev2_profile_add_del_command_fn,
};
/* *INDENT-ON* */
@@ -626,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);