summaryrefslogtreecommitdiff
path: root/pimd/pim_zlookup.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-10-20 13:07:47 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-10-20 13:28:46 +0200
commita243d1db93aaa123413a754fe69fbad36d810ae7 (patch)
tree3d2e74c2b3f4d4862f7a7029c2ff5d18d71999ae /pimd/pim_zlookup.c
parentbf4af4ffb5e2ffa0b34c5bd67b5b7d4aa912747f (diff)
*: convert zclient callbacks to table
This removes a giant `switch { }` block from lib/zclient.c and harmonizes all zclient callback function types to be the same (some had a subset of the args, some had a void return, now they all have ZAPI_CALLBACK_ARGS and int return.) Apart from getting rid of the giant switch, this is a minor security benefit since the function pointers are now in a `const` array, so they can't be overwritten by e.g. heap overflows for code execution anymore. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_zlookup.c')
-rw-r--r--pimd/pim_zlookup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c
index abf9577bd5..abf1119ac5 100644
--- a/pimd/pim_zlookup.c
+++ b/pimd/pim_zlookup.c
@@ -137,7 +137,7 @@ void zclient_lookup_new(void)
struct zclient_options options = zclient_options_default;
options.synchronous = true;
- zlookup = zclient_new(router->master, &options);
+ zlookup = zclient_new(router->master, &options, NULL, 0);
if (!zlookup) {
flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient_new() failure",
__func__);