From 1856a585ae4290e666314ee7907dc8cbbb08fe2d Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Thu, 17 Jul 2025 21:32:12 +0200 Subject: 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 Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/dir/dht.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/unicast/dir/dht.c') diff --git a/src/ipcpd/unicast/dir/dht.c b/src/ipcpd/unicast/dir/dht.c index 483570e8..da39e567 100644 --- a/src/ipcpd/unicast/dir/dht.c +++ b/src/ipcpd/unicast/dir/dht.c @@ -45,6 +45,7 @@ #include #include +#include "addr-auth.h" #include "common/connmgr.h" #include "dht.h" #include "dt.h" @@ -2258,7 +2259,7 @@ int dht_bootstrap(void * dir) pthread_rwlock_wrlock(&dht->lock); #ifndef __DHT_TEST__ - dht->b = hash_len(ipcpi.dir_hash_algo); + dht->b = ipcp_dir_hash_len(); #else dht->b = DHT_TEST_KEY_LEN; #endif @@ -2845,7 +2846,10 @@ void * dht_create(void) dht->b = 0; dht->id = NULL; #ifndef __DHT_TEST__ - dht->addr = ipcpi.dt_addr; + dht->addr = addr_auth_address(); + if (dht->addr == INVALID_ADDR) + goto fail_bmp; + dht->tpm = tpm_create(2, 1, dht_handle_packet, dht); if (dht->tpm == NULL) goto fail_tpm_create; -- cgit v1.2.3