From a56f27098759e24cce48b6f7a81087a3e82bb698 Mon Sep 17 00:00:00 2001 From: John Lo Date: Mon, 25 Jun 2018 20:38:35 -0400 Subject: Fix api trace replay of handler to pass vm parameter I suppose most API handlers do not use vm parameter so it has not been a problem so far. Now vl_api_vnet_set_ip6_ethernet_neighbor() was crashing when called from api trace replay because either of ip_neighbor_add_del_t_handler() vnet_arp_set_ip4_over_ethernet() need vm to be correct when it calls vlin_time_now() to update the neighbor timestamp. Change-Id: Iffb2084a7c90f92c4b86b339ea11800dd41117eb Signed-off-by: John Lo --- src/vlibmemory/vlib_api_cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c index ccdf3fb8bdd..d6eca598d75 100644 --- a/src/vlibmemory/vlib_api_cli.c +++ b/src/vlibmemory/vlib_api_cli.c @@ -621,13 +621,13 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename, if (msg_id < vec_len (am->msg_print_handlers) && am->msg_print_handlers[msg_id] && cfgp->replay_enable) { - void (*handler) (void *); + void (*handler) (void *, vlib_main_t *); handler = (void *) am->msg_handlers[msg_id]; if (!am->is_mp_safe[msg_id]) vl_msg_api_barrier_sync (); - (*handler) (tmpbuf + sizeof (uword)); + (*handler) (tmpbuf + sizeof (uword), vm); if (!am->is_mp_safe[msg_id]) vl_msg_api_barrier_release (); } -- cgit 1.2.3-korg