summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2018-06-14 11:40:49 -0500
committerFlorin Coras <florin.coras@gmail.com>2018-06-14 18:56:16 +0000
commitd465631c3c97b4eb387b4b2dd851e301dc09e007 (patch)
tree9a3dfc307e5c5c0550e16fa4cb3b05d9d4d41665
parent1f806587d8e1d94ee7630cee134fbaae2de2f31e (diff)
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 <mgsmith@netgate.com>
-rw-r--r--src/vlibapi/api_helper_macros.h2
1 files changed, 1 insertions, 1 deletions
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]); \