From 97ef24340da7d3f55a39ba16b400d13f9bbe9e60 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Sun, 16 Apr 2017 12:04:59 +0200 Subject: ipcpd: Allow specifying the hash algorithm to use Currently CRC32, MD5, and SHA3 (224, 256, 384 and 512 bit) are supported. --- src/ipcpd/normal/fmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ipcpd/normal/fmgr.c') diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c index 5166cc5d..ba36812f 100644 --- a/src/ipcpd/normal/fmgr.c +++ b/src/ipcpd/normal/fmgr.c @@ -439,7 +439,7 @@ int fmgr_np1_alloc(int fd, ssize_t ch; ssize_t i; char ** children; - char hashstr[DIR_HASH_STRLEN + 1]; + char hashstr[ipcp_dir_hash_strlen() + 1]; char * dst_ipcp = NULL; ipcp_hash_str(hashstr, dst); @@ -477,7 +477,7 @@ int fmgr_np1_alloc(int fd, msg.code = FLOW_ALLOC_CODE__FLOW_REQ; msg.has_hash = true; - msg.hash.len = ipcpi.dir_hash_len; + msg.hash.len = ipcp_dir_hash_len(); msg.hash.data = (uint8_t *) dst; msg.has_qoscube = true; msg.qoscube = cube; @@ -663,7 +663,7 @@ int fmgr_np1_post_buf(cep_id_t cep_id, fd = ipcp_flow_req_arr(getpid(), msg->hash.data, - ipcpi.dir_hash_len, + ipcp_dir_hash_len(), msg->qoscube); if (fd < 0) { pthread_mutex_unlock(&ipcpi.alloc_lock); -- cgit v1.2.3