summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2025-08-24 09:34:29 +0200
committerDimitri Staessens <dimitri@ouroboros.rocks>2025-08-24 09:34:29 +0200
commit89dba35fc0f22d7ceaeb171e7a50d86ed5848d57 (patch)
tree3e8973a6d3c7754498a9c0d4032fb0f2a2b08538
parent6292bbbd245cb64a346f5126670085e656e89a88 (diff)
downloadouroboros-89dba35fc0f22d7ceaeb171e7a50d86ed5848d57.tar.gz
ouroboros-89dba35fc0f22d7ceaeb171e7a50d86ed5848d57.zip
ipcpd: Start the connmgr first
The DT component (which starts the routing component) and enrollment component rely on the connmgr, and when enrolling larger networks, the link state component sometimes fails to connect because the conngmr is not fully started yet. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
-rw-r--r--src/ipcpd/unicast/main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ipcpd/unicast/main.c b/src/ipcpd/unicast/main.c
index cd0977d4..7989d3e1 100644
--- a/src/ipcpd/unicast/main.c
+++ b/src/ipcpd/unicast/main.c
@@ -120,6 +120,11 @@ static void finalize_components(void)
static int start_components(void)
{
+ if (connmgr_start() < 0) {
+ log_err("Failed to start AP connection manager.");
+ goto fail_connmgr_start;
+ }
+
if (dt_start() < 0) {
log_err("Failed to start data transfer.");
goto fail_dt_start;
@@ -135,11 +140,6 @@ static int start_components(void)
goto fail_enroll_start;
}
- if (connmgr_start() < 0) {
- log_err("Failed to start AP connection manager.");
- goto fail_connmgr_start;
- }
-
if (dir_start() < 0) {
log_err("Failed to start directory.");
goto fail_dir_start;
@@ -148,14 +148,14 @@ static int start_components(void)
return 0;
fail_dir_start:
- connmgr_stop();
- fail_connmgr_start:
enroll_stop();
fail_enroll_start:
fa_stop();
fail_fa_start:
dt_stop();
fail_dt_start:
+ connmgr_stop();
+ fail_connmgr_start:
ipcp_set_state(IPCP_INIT);
return -1;
}
@@ -164,14 +164,14 @@ static void stop_components(void)
{
dir_stop();
- connmgr_stop();
-
enroll_stop();
fa_stop();
dt_stop();
+ connmgr_stop();
+
ipcp_set_state(IPCP_BOOT);
}