diff options
author | John Lo <loj@cisco.com> | 2018-06-25 20:38:35 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-06-26 12:53:36 +0000 |
commit | a56f27098759e24cce48b6f7a81087a3e82bb698 (patch) | |
tree | 253d0ac729b5b55e439d6ccde17cfa464650af02 | |
parent | 0dbd5171344bf89d1519dae7e8ddbc056df6132e (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>
-rw-r--r-- | src/vlibmemory/vlib_api_cli.c | 4 |
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 (); } |