summaryrefslogtreecommitdiff
path: root/bfdd/bfdd.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2024-07-16 15:50:16 -0300
committerRafael Zalamena <rzalamena@opensourcerouting.org>2024-07-25 10:37:11 -0300
commit88a9aa9c6bec8049b36212fa3eb48b357b03b83a (patch)
tree89001b7e1bed55e5c57aeae671213c494ef89b0b /bfdd/bfdd.c
parent7ccd9cab303b801421d8f4ee8c7001394239665e (diff)
bfdd: remove control socket obsolete code
Let's remove the obsolete BFD control socket. If the functionality is needed then YANG/northbound notifications / getting should be used instead. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd/bfdd.c')
-rw-r--r--bfdd/bfdd.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/bfdd/bfdd.c b/bfdd/bfdd.c
index 243cf5c129..c2d8e926bf 100644
--- a/bfdd/bfdd.c
+++ b/bfdd/bfdd.c
@@ -28,8 +28,8 @@
* FRR related code.
*/
DEFINE_MGROUP(BFDD, "Bidirectional Forwarding Detection Daemon");
-DEFINE_MTYPE(BFDD, BFDD_CONTROL, "control socket memory");
-DEFINE_MTYPE(BFDD, BFDD_NOTIFICATION, "control notification data");
+DEFINE_MTYPE(BFDD, BFDD_CLIENT, "BFD client data");
+DEFINE_MTYPE(BFDD, BFDD_CLIENT_NOTIFICATION, "BFD client notification data");
/* Master of threads. */
struct event_loop *master;
@@ -67,9 +67,6 @@ static void sigterm_handler(void)
/* Stop receiving message from zebra. */
bfdd_zclient_stop();
- /* Shutdown controller to avoid receiving anymore commands. */
- control_shutdown();
-
/* Shutdown and free all protocol related memory. */
bfd_shutdown();
@@ -132,10 +129,8 @@ FRR_DAEMON_INFO(bfdd, BFD,
);
/* clang-format on */
-#define OPTION_CTLSOCK 1001
#define OPTION_DPLANEADDR 2000
static const struct option longopts[] = {
- {"bfdctl", required_argument, NULL, OPTION_CTLSOCK},
{"dplaneaddr", required_argument, NULL, OPTION_DPLANEADDR},
{0}
};
@@ -319,7 +314,6 @@ static void bg_init(void)
.cap_num_i = 0,
};
- TAILQ_INIT(&bglobal.bg_bcslist);
TAILQ_INIT(&bglobal.bg_obslist);
memcpy(&bglobal.bfdd_privs, &bfdd_privs,
@@ -328,8 +322,7 @@ static void bg_init(void)
int main(int argc, char *argv[])
{
- char ctl_path[512], dplane_addr[512];
- bool ctlsockused = false;
+ char dplane_addr[512];
int opt;
bglobal.bg_use_dplane = false;
@@ -339,7 +332,6 @@ int main(int argc, char *argv[])
frr_preinit(&bfdd_di, argc, argv);
frr_opt_add("", longopts,
- " --bfdctl Specify bfdd control socket\n"
" --dplaneaddr Specify BFD data plane address\n");
while (true) {
@@ -348,10 +340,6 @@ int main(int argc, char *argv[])
break;
switch (opt) {
- case OPTION_CTLSOCK:
- strlcpy(ctl_path, optarg, sizeof(ctl_path));
- ctlsockused = true;
- break;
case OPTION_DPLANEADDR:
strlcpy(dplane_addr, optarg, sizeof(dplane_addr));
bglobal.bg_use_dplane = true;
@@ -362,15 +350,9 @@ int main(int argc, char *argv[])
}
}
- if (!ctlsockused)
- snprintf(ctl_path, sizeof(ctl_path), BFDD_SOCK_NAME);
-
/* Initialize FRR infrastructure. */
master = frr_init();
- /* Initialize control socket. */
- control_init(ctl_path);
-
/* Initialize BFD data structures. */
bfd_initialize();
@@ -381,9 +363,6 @@ int main(int argc, char *argv[])
/* Initialize zebra connection. */
bfdd_zclient_init(&bglobal.bfdd_privs);
- event_add_read(master, control_accept, NULL, bglobal.bg_csock,
- &bglobal.bg_csockev);
-
/* Install commands. */
bfdd_vty_init();