socket API: Use pool index instead of handle in sock_delete handler
[vpp.git] / src / vlibmemory / socket_api.c
index 0f8c0f0..a8423d1 100644 (file)
@@ -470,7 +470,7 @@ vl_api_sockclnt_delete_t_handler (vl_api_sockclnt_delete_t * mp)
   if (!regp)
     return;
 
-  u32 reg_index = ntohl (mp->index);
+  u32 reg_index = socket_api_registration_handle_to_index (ntohl (mp->index));
   rp = vl_msg_api_alloc (sizeof (*rp));
   rp->_vl_msg_id = htons (VL_API_SOCKCLNT_DELETE_REPLY);
   rp->context = mp->context;