summaryrefslogtreecommitdiffstats
path: root/mgmtd/mgmt.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 /mgmtd/mgmt.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 'mgmtd/mgmt.c')
-rw-r--r--mgmtd/mgmt.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/mgmtd/mgmt.c b/mgmtd/mgmt.c
index 77c4473..8d41643 100644
--- a/mgmtd/mgmt.c
+++ b/mgmtd/mgmt.c
@@ -52,17 +52,26 @@ void mgmt_init(void)
/* Initialize the MGMTD Frontend Adapter Module */
mgmt_fe_adapter_init(mm->master);
- /* Initialize the CLI frontend client */
+ /*
+ * Initialize the CLI frontend client -- this queues an event for the
+ * client to short-circuit connect to the server (ourselves).
+ */
vty_init_mgmt_fe();
- /* MGMTD VTY commands installation. */
+ /*
+ * MGMTD VTY commands installation -- the frr lib code will queue an
+ * event to read the config files which needs to happen after the
+ * connect from above is made.
+ */
mgmt_vty_init();
/*
* Initialize the MGMTD Backend Adapter Module
*
- * We do this after the FE stuff so that we always read our config file
- * prior to any BE connection.
+ * We do this after the FE stuff so that we have read our config file
+ * prior to any BE connection. Setting up the server will queue a
+ * "socket read" event to accept BE connections. So the code is counting
+ * on the above 2 events to run prior to any `accept` event from here.
*/
mgmt_be_adapter_init(mm->master);
}