ikev2: add support for custom ipsec-over-udp port
[vpp.git] / src / vnet / cop / cop_api.c
index 95d5a9f..1415bf0 100644 (file)
@@ -91,7 +91,7 @@ static void vl_api_cop_whitelist_enable_disable_t_handler
 /*
  * cop_api_hookup
  * Add vpe's API message handlers to the table.
- * vlib has alread mapped shared memory and
+ * vlib has already mapped shared memory and
  * added the client registration handlers.
  * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
  */
@@ -110,7 +110,7 @@ setup_message_id_table (api_main_t * am)
 static clib_error_t *
 cop_api_hookup (vlib_main_t * vm)
 {
-  api_main_t *am = &api_main;
+  api_main_t *am = vlibapi_get_main ();
 
 #define _(N,n)                                                  \
     vl_msg_api_set_handlers(VL_API_##N, #n,                     \