summaryrefslogtreecommitdiffstats
path: root/pimd/pim_mlag.h
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_mlag.h
parentMerge pull request #9848 from ton31337/feature/as-path_autocomplete (diff)
downloadfrr-a243d1db93aaa123413a754fe69fbad36d810ae7.tar.xz
frr-a243d1db93aaa123413a754fe69fbad36d810ae7.zip
*: 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_mlag.h')
-rw-r--r--pimd/pim_mlag.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/pimd/pim_mlag.h b/pimd/pim_mlag.h
index b044c31c4..996e4d473 100644
--- a/pimd/pim_mlag.h
+++ b/pimd/pim_mlag.h
@@ -24,6 +24,7 @@
#ifndef __PIM_MLAG_H__
#define __PIM_MLAG_H__
+#include "zclient.h"
#include "mlag.h"
#include "pim_iface.h"
@@ -33,9 +34,9 @@ extern void pim_instance_mlag_init(struct pim_instance *pim);
extern void pim_instance_mlag_terminate(struct pim_instance *pim);
extern void pim_if_configure_mlag_dualactive(struct pim_interface *pim_ifp);
extern void pim_if_unconfigure_mlag_dualactive(struct pim_interface *pim_ifp);
-extern int pim_zebra_mlag_process_up(void);
-extern int pim_zebra_mlag_process_down(void);
-extern int pim_zebra_mlag_handle_msg(struct stream *msg, int len);
+extern int pim_zebra_mlag_process_up(ZAPI_CALLBACK_ARGS);
+extern int pim_zebra_mlag_process_down(ZAPI_CALLBACK_ARGS);
+extern int pim_zebra_mlag_handle_msg(ZAPI_CALLBACK_ARGS);
/* pm_zpthread.c */
extern int pim_mlag_signal_zpthread(void);