summaryrefslogtreecommitdiff
path: root/src/ipcpd/common
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2025-07-17 21:32:12 +0200
committerSander Vrijders <sander@ouroboros.rocks>2025-07-23 15:07:59 +0200
commit1856a585ae4290e666314ee7907dc8cbbb08fe2d (patch)
treeb3062938a8b18ffd9eded99074de62b14e57b2f6 /src/ipcpd/common
parent4ed5f4527ba034b399386beea2949bccf69ce65a (diff)
downloadouroboros-1856a585ae4290e666314ee7907dc8cbbb08fe2d.tar.gz
ouroboros-1856a585ae4290e666314ee7907dc8cbbb08fe2d.zip
ipcpd: Refactor ipcp main struct
The ipcpi (IPCP instance) is now cleanly tucked away within its source file instead of exposed all over the place. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/common')
-rw-r--r--src/ipcpd/common/enroll.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipcpd/common/enroll.c b/src/ipcpd/common/enroll.c
index 5e35ce37..3fc999af 100644
--- a/src/ipcpd/common/enroll.c
+++ b/src/ipcpd/common/enroll.c
@@ -227,12 +227,14 @@ int enroll_boot(struct conn * conn,
return -1;
}
- if (resp.conf.type != ipcpi.type) {
+ if (resp.conf.type != ipcp_get_type()) {
log_err_id(id, "Wrong type in enrollment response %d (%d).",
- resp.conf.type, ipcpi.type);
+ resp.conf.type, ipcp_get_type());
return -1;
}
+ enroll.conf = resp.conf;
+
clock_gettime(CLOCK_REALTIME, &rtt);
delta_t = ts_diff_ms(&t0, &rtt);
@@ -243,8 +245,6 @@ int enroll_boot(struct conn * conn,
if (labs(ts_diff_ms(&t0, &rtt)) - delta_t > ENROLL_WARN_TIME_OFFSET)
log_warn_id(id, "Clock offset above threshold.");
- enroll.conf = resp.conf;
-
return 0;
}