From d465631c3c97b4eb387b4b2dd851e301dc09e007 Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Thu, 14 Jun 2018 11:40:49 -0500 Subject: Fix SEGV in generic event sub reaper When a client subscribed to receive events disconnects from the API, while deleting their subscription, a hash lookup was being performed against a pointer that did not refer to a hash, resulting in a SEGV. Perform the hash lookup against the correct hash. Change-Id: I011d7479e2c3b9ee50721cf7499385c3ff7f704a Signed-off-by: Matthew Smith --- src/vlibapi/api_helper_macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vlibapi/api_helper_macros.h') diff --git a/src/vlibapi/api_helper_macros.h b/src/vlibapi/api_helper_macros.h index fe9cde03d4d..1245db82dd0 100644 --- a/src/vlibapi/api_helper_macros.h +++ b/src/vlibapi/api_helper_macros.h @@ -215,7 +215,7 @@ static clib_error_t * vl_api_want_##lca##_t_reaper (u32 client_index) \ vpe_client_registration_t *rp; \ uword *p; \ \ - p = hash_get (vam->lca##_registrations, client_index); \ + p = hash_get (vam->lca##_registration_hash, client_index); \ if (p) \ { \ rp = pool_elt_at_index (vam->lca##_registrations, p[0]); \ -- cgit 1.2.3-korg