summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-07-12 14:30:27 +0000
committerdimitri staessens <[email protected]>2017-07-12 14:30:27 +0000
commit0bcb3ab0804bbfd31d056c08548cb40591598f4b (patch)
treed1da4fcf7cc2875b077d767775359ad92dc10d7c /src/ipcpd
parent3e9ee89b3ccf48dcabf7de2ecafcfbf637595cfe (diff)
parentd088c3395a28bce3e1530db5aeacbcf59ab16619 (diff)
downloadouroboros-0bcb3ab0804bbfd31d056c08548cb40591598f4b.tar.gz
ouroboros-0bcb3ab0804bbfd31d056c08548cb40591598f4b.zip
Merged in sandervrijders/ouroboros/be-hash (pull request #528)
ipcpd, lib, irmd: Hardcode shim hash algorithms Approved-by: dimitri staessens <[email protected]>
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/ipcp.c6
-rw-r--r--src/ipcpd/local/main.c2
-rw-r--r--src/ipcpd/shim-eth-llc/main.c2
-rw-r--r--src/ipcpd/shim-udp/main.c2
4 files changed, 5 insertions, 7 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index e86487af..4aec7567 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -212,8 +212,6 @@ static void * ipcp_main_loop(void * o)
conf_msg = msg->conf;
conf.type = conf_msg->ipcp_type;
- conf.dif_info.dir_hash_algo =
- conf_msg->dif_info->dir_hash_algo;
strcpy(conf.dif_info.dif_name,
conf_msg->dif_info->dif_name);
if (conf.dif_info.dif_name == NULL) {
@@ -229,6 +227,8 @@ static void * ipcp_main_loop(void * o)
conf.dt_gam_type = conf_msg->dt_gam_type;
conf.rm_gam_type = conf_msg->rm_gam_type;
conf.routing_type = conf_msg->routing_type;
+ conf.dif_info.dir_hash_algo =
+ conf_msg->dif_info->dir_hash_algo;
}
if (conf_msg->ipcp_type == IPCP_SHIM_UDP) {
@@ -239,6 +239,8 @@ static void * ipcp_main_loop(void * o)
if (conf_msg->ipcp_type == IPCP_SHIM_ETH_LLC)
conf.if_name = conf_msg->if_name;
+ ipcpi.dir_hash_algo = conf_msg->dif_info->dir_hash_algo;
+
ret_msg.result = ipcpi.ops->ipcp_bootstrap(&conf);
break;
case IPCP_MSG_CODE__IPCP_ENROLL:
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c
index 758e57ae..ddb5e4ec 100644
--- a/src/ipcpd/local/main.c
+++ b/src/ipcpd/local/main.c
@@ -119,7 +119,7 @@ static int ipcp_local_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- ipcpi.dir_hash_algo = conf->dif_info.dir_hash_algo;
+ (void) conf;
ipcp_set_state(IPCP_OPERATIONAL);
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c
index 99d46a1d..28ab897b 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/shim-eth-llc/main.c
@@ -758,8 +758,6 @@ static int eth_llc_ipcp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- ipcpi.dir_hash_algo = conf->dif_info.dir_hash_algo;
-
if (conf->if_name == NULL) {
log_err("Interface name is NULL.");
return -1;
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index 4ef3015a..ab199ffd 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -535,8 +535,6 @@ static int ipcp_udp_bootstrap(const struct ipcp_config * conf)
assert(conf);
assert(conf->type == THIS_TYPE);
- ipcpi.dir_hash_algo = conf->dif_info.dir_hash_algo;
-
if (inet_ntop(AF_INET,
&conf->ip_addr,
ipstr,