aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/memif/memif.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index f082b58ceb4..d21a30eb061 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -67,6 +67,7 @@ memif_queue_intfd_close (memif_queue_t * mq)
void
memif_disconnect (memif_if_t * mif, clib_error_t * err)
{
+ memif_main_t *mm = &memif_main;
vnet_main_t *vnm = vnet_get_main ();
memif_region_t *mr;
memif_queue_t *mq;
@@ -94,6 +95,9 @@ memif_disconnect (memif_if_t * mif, clib_error_t * err)
/* close connection socket */
if (mif->conn_unix_file_index != ~0)
{
+ memif_socket_file_t *msf = vec_elt_at_index (mm->socket_files,
+ mif->socket_file_index);
+ hash_unset (msf->dev_instance_by_fd, mif->conn_fd);
memif_file_del_by_index (mif->conn_unix_file_index);
mif->conn_unix_file_index = ~0;
}