aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-06-25 20:38:35 -0400
committerDamjan Marion <dmarion@me.com>2018-06-26 12:53:36 +0000
commita56f27098759e24cce48b6f7a81087a3e82bb698 (patch)
tree253d0ac729b5b55e439d6ccde17cfa464650af02 /src
parent0dbd5171344bf89d1519dae7e8ddbc056df6132e (diff)
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 <loj@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vlibmemory/vlib_api_cli.c4
1 files 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 ();
}