summaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2_cli.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-02-25 09:27:10 +0000
committerDamjan Marion <dmarion@me.com>2020-03-02 09:10:57 +0000
commitb29d523af039ac007238300a7316ba9e3e44ce25 (patch)
treea33fd5e17a9df9d881ced2d03b99a6b92f15492a /src/plugins/ikev2/ikev2_cli.c
parent05aceacc38d1988c0651829d4733feb4745b427e (diff)
ikev2: make UDP encap flag configurable
Type: improvement Change-Id: I081dec2dc0c2bd0845dd4638b7b2f12806594112 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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c
index a48828d3499..6b9876b4ead 100644
--- a/src/plugins/ikev2/ikev2_cli.c
+++ b/src/plugins/ikev2/ikev2_cli.c
@@ -370,6 +370,12 @@ ikev2_profile_add_del_command_fn (vlib_main_t * vm,
ikev2_set_profile_sa_lifetime (vm, name, tmp4, tmp1, tmp2, tmp5);
goto done;
}
+ else if (unformat (line_input, "set %U udp-encap",
+ unformat_token, valid_chars, &name))
+ {
+ r = ikev2_set_profile_udp_encap (vm, name);
+ goto done;
+ }
else
break;
}
@@ -393,6 +399,7 @@ VLIB_CLI_COMMAND (ikev2_profile_add_del_command, static) = {
" <data>\n"
"ikev2 profile set <id> id <local|remote> <type> <data>\n"
"ikev2 profile set <id> tunnel <interface>\n"
+ "ikev2 profile set <id> udp-encap\n"
"ikev2 profile set <id> traffic-selector <local|remote> ip-range "
"<start-addr> - <end-addr> port-range <start-port> - <end-port> "
"protocol <protocol-number>\n"
@@ -477,6 +484,8 @@ show_ikev2_profile_command_fn (vlib_main_t * vm,
if (~0 != p->tun_itf)
vlib_cli_output(vm, " protected tunnel %U",
format_vnet_sw_if_index_name, vnet_get_main(), p->tun_itf);
+ if (p->udp_encap)
+ vlib_cli_output(vm, " udp-encap");
}));
/* *INDENT-ON* */