summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrp_main.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:32 +0000
commit35cadacd2bb9383686753731e31bd7e145fb2506 (patch)
tree4489adbde75a837989533837185b2b8369a0bf68 /nhrpd/nhrp_main.c
parentAdding debian version 9.1-0.1. (diff)
downloadfrr-35cadacd2bb9383686753731e31bd7e145fb2506.tar.xz
frr-35cadacd2bb9383686753731e31bd7e145fb2506.zip
Merging upstream version 10.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'nhrpd/nhrp_main.c')
-rw-r--r--nhrpd/nhrp_main.c25
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();