summaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2_cli.c
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2021-02-22 16:15:51 +0000
committerDamjan Marion <dmarion@me.com>2021-03-15 17:38:05 +0000
commitaf2cc6425e7615cb90359254ae8fd429e4fea198 (patch)
tree2968103d6c0ccbf1c55883d5d56e9a93720652e5 /src/plugins/ikev2/ikev2_cli.c
parent418abe2a259bc8c04c3b8839099204d56ae504ba (diff)
ikev2: support responder hostname
Type: feature Ticket: VPP-1901 Change-Id: I1ad222b54363fd35679d0132d458345a9a18362c 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.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/ikev2/ikev2_cli.c b/src/plugins/ikev2/ikev2_cli.c
index 7778166254c..3523ce079b6 100644
--- a/src/plugins/ikev2/ikev2_cli.c
+++ b/src/plugins/ikev2/ikev2_cli.c
@@ -444,6 +444,15 @@ ikev2_profile_add_del_command_fn (vlib_main_t * vm,
ikev2_set_profile_responder (vm, name, responder_sw_if_index, ip);
goto done;
}
+ else if (unformat (line_input, "set %U responder %U %v",
+ unformat_ikev2_token, &name,
+ unformat_vnet_sw_interface, vnm,
+ &responder_sw_if_index, &data))
+ {
+ r = ikev2_set_profile_responder_hostname (vm, name, data,
+ responder_sw_if_index);
+ goto done;
+ }
else if (unformat (line_input, "set %U tunnel %U",
unformat_ikev2_token, &name,
unformat_vnet_sw_interface, vnm, &tun_sw_if_index))
@@ -615,9 +624,10 @@ show_ikev2_profile_command_fn (vlib_main_t * vm,
vlib_cli_output(vm, " protected tunnel %U",
format_vnet_sw_if_index_name, vnet_get_main(), p->tun_itf);
if (~0 != p->responder.sw_if_index)
- vlib_cli_output(vm, " responder %U %U",
- format_vnet_sw_if_index_name, vnet_get_main(), p->responder.sw_if_index,
- format_ip_address, &p->responder.addr);
+ vlib_cli_output (vm, " responder %U %U %v",
+ format_vnet_sw_if_index_name, vnet_get_main (),
+ p->responder.sw_if_index, format_ip_address,
+ &p->responder.addr, p->responder.hostname);
if (p->udp_encap)
vlib_cli_output(vm, " udp-encap");