summaryrefslogtreecommitdiffstats
path: root/bfdd/bfdd.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:24:31 +0000
commitacb594b1d825c6e12369cebb941968ec08c840ce (patch)
treed544788908e7353a4f117e2991f15f4236a0c963 /bfdd/bfdd.c
parentAdding upstream version 9.1. (diff)
downloadfrr-acb594b1d825c6e12369cebb941968ec08c840ce.tar.xz
frr-acb594b1d825c6e12369cebb941968ec08c840ce.zip
Adding upstream version 10.0.upstream/10.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bfdd/bfdd.c')
-rw-r--r--bfdd/bfdd.c28
1 files changed, 17 insertions, 11 deletions
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();