summaryrefslogtreecommitdiff
path: root/src/ipcpd/udp
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2024-01-21 18:03:01 +0100
committerSander Vrijders <sander@ouroboros.rocks>2024-01-31 10:27:57 +0100
commit7bb8aed15c7f29de4d9719acf8db7fdf73731af5 (patch)
tree71e7c45335ea584101f2e30973bb486b525a707f /src/ipcpd/udp
parent467a04de7d615dac943c051c27b851316c198bde (diff)
downloadouroboros-7bb8aed15c7f29de4d9719acf8db7fdf73731af5.tar.gz
ouroboros-7bb8aed15c7f29de4d9719acf8db7fdf73731af5.zip
ipcpd: Fix hash conversion in ipcpd-udp
The bootstrap function was not returning the correct hash. Bug introduced in 99545fa2. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/udp')
-rw-r--r--src/ipcpd/udp/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ipcpd/udp/main.c b/src/ipcpd/udp/main.c
index c6181984..a8168f21 100644
--- a/src/ipcpd/udp/main.c
+++ b/src/ipcpd/udp/main.c
@@ -592,8 +592,10 @@ static int udp_ipcp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
+ ((struct ipcp_config *) conf)->layer_info.dir_hash_algo =
+ (enum pol_dir_hash) HASH_MD5;
- ipcpi.dir_hash_algo = HASH_MD5;
+ ipcpi.dir_hash_algo = (enum hash_algo) conf->layer_info.dir_hash_algo;
strcpy(ipcpi.layer_name, conf->layer_info.name);
if (inet4_ntop(&conf->udp.ip_addr, ipstr) == NULL) {