summaryrefslogtreecommitdiffstats
path: root/vlib-api
diff options
context:
space:
mode:
Diffstat (limited to 'vlib-api')
-rw-r--r--vlib-api/vlibmemory/memory_shared.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vlib-api/vlibmemory/memory_shared.c b/vlib-api/vlibmemory/memory_shared.c
index 6adc69fc05f..d8d3200485e 100644
--- a/vlib-api/vlibmemory/memory_shared.c
+++ b/vlib-api/vlibmemory/memory_shared.c
@@ -801,6 +801,11 @@ unix_shared_memory_queue_t *
vl_api_client_index_to_input_queue (u32 index)
{
vl_api_registration_t *regp;
+ api_main_t *am = &api_main;
+
+ /* Special case: vlib trying to send itself a message */
+ if (index == (u32) ~ 0)
+ return (am->shmem_hdr->vl_input_queue);
regp = vl_api_client_index_to_registration_internal (index);
if (!regp)