summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipsec')
-rw-r--r--src/vnet/ipsec/ipsec_cli.c4
-rw-r--r--src/vnet/ipsec/ipsec_itf.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index 937e0f6b2e4..7d265f7e64d 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -997,6 +997,8 @@ ipsec_tun_protect_cmd (vlib_main_t * vm,
if (!is_del)
ipsec_tun_protect_update (sw_if_index, &peer, sa_out, sa_ins);
+ else
+ ipsec_tun_protect_del (sw_if_index, &peer);
unformat_free (line_input);
return NULL;
@@ -1010,7 +1012,7 @@ VLIB_CLI_COMMAND (ipsec_tun_protect_cmd_node, static) =
{
.path = "ipsec tunnel protect",
.function = ipsec_tun_protect_cmd,
- .short_help = "ipsec tunnel protect <interface> input-sa <SA> output-sa <SA>",
+ .short_help = "ipsec tunnel protect <interface> input-sa <SA> output-sa <SA> [add|del]",
// this is not MP safe
};
/* *INDENT-ON* */
diff --git a/src/vnet/ipsec/ipsec_itf.c b/src/vnet/ipsec/ipsec_itf.c
index 756bc19fbef..6724eab73a8 100644
--- a/src/vnet/ipsec/ipsec_itf.c
+++ b/src/vnet/ipsec/ipsec_itf.c
@@ -294,12 +294,10 @@ ipsec_itf_create (u32 user_instance, tunnel_mode_t mode, u32 * sw_if_indexp)
ipsec_itf->ii_mode = mode;
ipsec_itf->ii_user_instance = instance;
- if (~0 == ipsec_itf->ii_user_instance)
- ipsec_itf->ii_user_instance = t_idx;
hw_if_index = vnet_register_interface (vnm,
ipsec_itf_device_class.index,
- t_idx,
+ ipsec_itf->ii_user_instance,
ipsec_hw_interface_class.index,
t_idx);