diff options
Diffstat (limited to '')
-rw-r--r-- | nhrpd/nhrp_main.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/nhrpd/nhrp_main.c b/nhrpd/nhrp_main.c index 593498c..adb8be3 100644 --- a/nhrpd/nhrp_main.c +++ b/nhrpd/nhrp_main.c @@ -88,10 +88,12 @@ static void nhrp_request_stop(void) nhrp_zebra_terminate(); vici_terminate(); evmgr_terminate(); - nhrp_vc_terminate(); vrf_terminate(); + nhrp_vc_terminate(); debugf(NHRP_DEBUG_COMMON, "Done."); + + resolver_terminate(); frr_fini(); exit(0); @@ -118,15 +120,20 @@ static const struct frr_yang_module_info *const nhrpd_yang_modules[] = { &frr_vrf_info, }; -FRR_DAEMON_INFO(nhrpd, NHRP, .vty_port = NHRP_VTY_PORT, +/* clang-format off */ +FRR_DAEMON_INFO(nhrpd, NHRP, + .vty_port = NHRP_VTY_PORT, + .proghelp = "Implementation of the NHRP routing protocol.", - .proghelp = "Implementation of the NHRP routing protocol.", + .signals = sighandlers, + .n_signals = array_size(sighandlers), - .signals = sighandlers, .n_signals = array_size(sighandlers), + .privs = &nhrpd_privs, - .privs = &nhrpd_privs, .yang_modules = nhrpd_yang_modules, - .n_yang_modules = array_size(nhrpd_yang_modules), + .yang_modules = nhrpd_yang_modules, + .n_yang_modules = array_size(nhrpd_yang_modules), ); +/* clang-format on */ int main(int argc, char **argv) { @@ -155,8 +162,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(); |