aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2_api.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_api.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_api.c')
-rw-r--r--src/plugins/ikev2/ikev2_api.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/plugins/ikev2/ikev2_api.c b/src/plugins/ikev2/ikev2_api.c
index bfcfa64cb28..f846bfab9f0 100644
--- a/src/plugins/ikev2/ikev2_api.c
+++ b/src/plugins/ikev2/ikev2_api.c
@@ -134,6 +134,28 @@ vl_api_ikev2_profile_set_id_t_handler (vl_api_ikev2_profile_set_id_t * mp)
}
static void
+ vl_api_ikev2_profile_set_udp_encap_t_handler
+ (vl_api_ikev2_profile_set_udp_encap_t * mp)
+{
+ vl_api_ikev2_profile_set_udp_encap_reply_t *rmp;
+ int rv = 0;
+
+#if WITH_LIBSSL > 0
+ vlib_main_t *vm = vlib_get_main ();
+ clib_error_t *error;
+ u8 *tmp = format (0, "%s", mp->name);
+ error = ikev2_set_profile_udp_encap (vm, tmp);
+ vec_free (tmp);
+ if (error)
+ rv = VNET_API_ERROR_UNSPECIFIED;
+#else
+ rv = VNET_API_ERROR_UNIMPLEMENTED;
+#endif
+
+ REPLY_MACRO (VL_API_IKEV2_PROFILE_SET_UDP_ENCAP);
+}
+
+static void
vl_api_ikev2_profile_set_ts_t_handler (vl_api_ikev2_profile_set_ts_t * mp)
{
vl_api_ikev2_profile_set_ts_reply_t *rmp;