summaryrefslogtreecommitdiff
path: root/nhrpd
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 /nhrpd
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 'nhrpd')
-rw-r--r--nhrpd/nhrp_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c
index e401f21ed4..73af78cbf0 100644
--- a/nhrpd/nhrp_main.c
+++ b/nhrpd/nhrp_main.c
@@ -155,8 +155,10 @@ int main(int argc, char **argv)
nhrp_vc_init();
nhrp_packet_init();
vici_init();
- if_zapi_callbacks(nhrp_ifp_create, nhrp_ifp_up,
- nhrp_ifp_down, nhrp_ifp_destroy);
+ hook_register_prio(if_real, 0, nhrp_ifp_create);
+ hook_register_prio(if_up, 0, nhrp_ifp_up);
+ hook_register_prio(if_down, 0, nhrp_ifp_down);
+ hook_register_prio(if_unreal, 0, nhrp_ifp_destroy);
nhrp_zebra_init();
nhrp_shortcut_init();