diff options
author | Benoît Ganne <bganne@cisco.com> | 2022-03-04 17:17:04 +0100 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2022-03-23 18:23:29 +0000 |
commit | 7f9256e31c13fdfb640eff9d7775bc50b4396543 (patch) | |
tree | 3d799496f125655ca973d6da1c99fabc12787824 /src/plugins/unittest | |
parent | 8296a1d043ce6584561dabbc671087e040a3ae13 (diff) |
api: better segregate client and server code
- move memory and server specific vl_msg_api_handler_with_vm_node()
to memory server code only
- keep api_global_main static
Apart from being cleaner, this also helps avoiding symbols conflict
when both client and server libs are loaded in the same process, as is
done by the prom plugin.
Those symbols conflict confuse ASan and can be nasty to debug.
Type: improvement
Change-Id: Iaf58596cc753ad8d3fedd8d65c4bf480ac129c2c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/unittest')
-rw-r--r-- | src/plugins/unittest/api_fuzz_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/unittest/api_fuzz_test.c b/src/plugins/unittest/api_fuzz_test.c index 113835300bb..9cf767a5ccd 100644 --- a/src/plugins/unittest/api_fuzz_test.c +++ b/src/plugins/unittest/api_fuzz_test.c @@ -27,7 +27,7 @@ static u32 fuzz_seed = 0xdeaddabe; static u16 fuzz_first; static u16 fuzz_cli_first, fuzz_cli_last; -extern void (*vl_msg_api_fuzz_hook) (u16, void *); +extern void (*vl_mem_api_fuzz_hook) (u16, void *); static void fuzz_hook (u16 id, void *the_msg) @@ -114,10 +114,10 @@ test_api_fuzz_command_fn (vlib_main_t * vm, if (fuzz_first == 0xFFFF) { - vl_msg_api_fuzz_hook = 0; + vl_mem_api_fuzz_hook = 0; return clib_error_return (0, "fuzz_first is ~0, fuzzing disabled"); } - vl_msg_api_fuzz_hook = fuzz_hook; + vl_mem_api_fuzz_hook = fuzz_hook; vlib_cli_output (vm, "Fuzzing enabled: first %d, skip cli range %d - %d", (u32) fuzz_first, (u32) fuzz_cli_first, @@ -172,7 +172,7 @@ api_fuzz_api_init (vlib_main_t * vm) (0, "Couldn't find 'memclnt_keepalive_reply' ID"); } /* Turn on fuzzing */ - vl_msg_api_fuzz_hook = fuzz_hook; + vl_mem_api_fuzz_hook = fuzz_hook; return 0; } |