diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-12 16:56:45 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-10-12 17:34:43 +0200 |
commit | b8c73d171d4352293b18ddbc71c587233d1f2fa5 (patch) | |
tree | b9bb9f294c65efaae3495f23342c29b5f29d1683 /src/lib/irm.c | |
parent | 33e89097c05cb0bb1816a15aa5ef4740d03eb90a (diff) | |
download | ouroboros-b8c73d171d4352293b18ddbc71c587233d1f2fa5.tar.gz ouroboros-b8c73d171d4352293b18ddbc71c587233d1f2fa5.zip |
lib: Set hash algorithm correctly
There was a bug where the hash selection for the local, raptor and
ethernet IPCPs was not passed correctly, so they were using a wrong
hash.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/lib/irm.c')
-rw-r--r-- | src/lib/irm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/irm.c b/src/lib/irm.c index d88475c4..384da7b0 100644 --- a/src/lib/irm.c +++ b/src/lib/irm.c @@ -117,6 +117,9 @@ int irm_bootstrap_ipcp(pid_t pid, config.ipcp_type = conf->type; + if (conf->type != IPCP_UDP) + layer_info.dir_hash_algo = conf->layer_info.dir_hash_algo; + switch (conf->type) { case IPCP_NORMAL: config.has_addr_size = true; @@ -131,7 +134,6 @@ int irm_bootstrap_ipcp(pid_t pid, config.routing_type = conf->routing_type; config.has_pff_type = true; config.pff_type = conf->pff_type; - layer_info.dir_hash_algo = conf->layer_info.dir_hash_algo; break; case IPCP_UDP: config.has_ip_addr = true; |