diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2023-11-02 13:49:28 -0700 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2023-11-02 17:10:43 -0700 |
| commit | d889055d8e8d87cac0f4a7086e5b453bbe2d0f79 (patch) | |
| tree | 0fb96873f9b22943218f7c7d876839470370ca5f /ldpd | |
| parent | 8e3a96e846a15f34384a20a3ede2e894d7e97253 (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 'ldpd')
| -rw-r--r-- | ldpd/ldp_zebra.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ldpd/ldp_zebra.c b/ldpd/ldp_zebra.c index 0fd5d4613c..a9814f18f8 100644 --- a/ldpd/ldp_zebra.c +++ b/ldpd/ldp_zebra.c @@ -682,7 +682,10 @@ static zclient_handler *const ldp_handlers[] = { void ldp_zebra_init(struct event_loop *master) { - if_zapi_callbacks(ldp_ifp_create, ldp_ifp_up, ldp_ifp_down, ldp_ifp_destroy); + hook_register_prio(if_real, 0, ldp_ifp_create); + hook_register_prio(if_up, 0, ldp_ifp_up); + hook_register_prio(if_down, 0, ldp_ifp_down); + hook_register_prio(if_unreal, 0, ldp_ifp_destroy); /* Set default values. */ zclient = zclient_new(master, &zclient_options_default, ldp_handlers, |
