From 35cadacd2bb9383686753731e31bd7e145fb2506 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 06:24:32 +0200 Subject: Merging upstream version 10.0. Signed-off-by: Daniel Baumann --- bfdd/bfdd.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'bfdd/bfdd.c') diff --git a/bfdd/bfdd.c b/bfdd/bfdd.c index 95066b9..243cf5c 100644 --- a/bfdd/bfdd.c +++ b/bfdd/bfdd.c @@ -75,6 +75,8 @@ static void sigterm_handler(void) bfd_vrf_terminate(); + bfdd_zclient_terminate(); + /* Terminate and free() FRR related memory. */ frr_fini(); @@ -115,13 +117,20 @@ static const struct frr_yang_module_info *const bfdd_yang_modules[] = { &frr_vrf_info, }; -FRR_DAEMON_INFO(bfdd, BFD, .vty_port = 2617, - .proghelp = "Implementation of the BFD protocol.", - .signals = bfd_signals, .n_signals = array_size(bfd_signals), - .privs = &bglobal.bfdd_privs, - .yang_modules = bfdd_yang_modules, - .n_yang_modules = array_size(bfdd_yang_modules), +/* clang-format off */ +FRR_DAEMON_INFO(bfdd, BFD, + .vty_port = BFDD_VTY_PORT, + .proghelp = "Implementation of the BFD protocol.", + + .signals = bfd_signals, + .n_signals = array_size(bfd_signals), + + .privs = &bglobal.bfdd_privs, + + .yang_modules = bfdd_yang_modules, + .n_yang_modules = array_size(bfdd_yang_modules), ); +/* clang-format on */ #define OPTION_CTLSOCK 1001 #define OPTION_DPLANEADDR 2000 @@ -333,8 +342,6 @@ int main(int argc, char *argv[]) " --bfdctl Specify bfdd control socket\n" " --dplaneaddr Specify BFD data plane address\n"); - snprintf(ctl_path, sizeof(ctl_path), BFDD_CONTROL_SOCKET, - "", ""); while (true) { opt = frr_getopt(argc, argv, NULL); if (opt == EOF) @@ -355,9 +362,8 @@ int main(int argc, char *argv[]) } } - if (bfdd_di.pathspace && !ctlsockused) - snprintf(ctl_path, sizeof(ctl_path), BFDD_CONTROL_SOCKET, - "/", bfdd_di.pathspace); + if (!ctlsockused) + snprintf(ctl_path, sizeof(ctl_path), BFDD_SOCK_NAME); /* Initialize FRR infrastructure. */ master = frr_init(); -- cgit v1.2.3