summaryrefslogtreecommitdiff
path: root/vrrpd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2023-11-02 13:49:28 -0700
committerDavid Lamparter <equinox@opensourcerouting.org>2023-11-02 17:10:43 -0700
commitd889055d8e8d87cac0f4a7086e5b453bbe2d0f79 (patch)
tree0fb96873f9b22943218f7c7d876839470370ca5f /vrrpd
parent8e3a96e846a15f34384a20a3ede2e894d7e97253 (diff)
lib: convert if_zapi_callbacks into actual hooks
...so that multiple functions can be subscribed. The create/destroy hooks are renamed to real/unreal because that's what they *actually* signal. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vrrpd')
-rw-r--r--vrrpd/vrrp_zebra.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vrrpd/vrrp_zebra.c b/vrrpd/vrrp_zebra.c
index 6d753d2e47..10394752e0 100644
--- a/vrrpd/vrrp_zebra.c
+++ b/vrrpd/vrrp_zebra.c
@@ -183,8 +183,10 @@ static zclient_handler *const vrrp_handlers[] = {
void vrrp_zebra_init(void)
{
- if_zapi_callbacks(vrrp_ifp_create, vrrp_ifp_up,
- vrrp_ifp_down, vrrp_ifp_destroy);
+ hook_register_prio(if_real, 0, vrrp_ifp_create);
+ hook_register_prio(if_up, 0, vrrp_ifp_up);
+ hook_register_prio(if_down, 0, vrrp_ifp_down);
+ hook_register_prio(if_unreal, 0, vrrp_ifp_destroy);
/* Socket for receiving updates from Zebra daemon */
zclient = zclient_new(master, &zclient_options_default, vrrp_handlers,