Browse Source

Compilation fixes

pull/392/head
Luca Deri 4 years ago
parent
commit
25620fcbc7
  1. 4
      src/aes.c
  2. 2
      src/sn_utils.c
  3. 4
      src/wire.c

4
src/aes.c

@ -84,6 +84,8 @@ int aes_cbc_encrypt (unsigned char *out, const unsigned char *in, size_t in_len,
tmp_iv,
AES_ENCRYPT);
#endif
return(0);
}
/* ****************************************************** */
@ -141,6 +143,8 @@ int aes_ecb_decrypt (unsigned char *out, const unsigned char *in, aes_context_t
#else
AES_ecb_encrypt(in, out, &(ctx->dec_key), AES_DECRYPT);
#endif
return(0);
}
/* ****************************************************** */

2
src/sn_utils.c

@ -413,7 +413,7 @@ int assign_one_ip_subnet(n2n_sn_t *sss,
no_subnets += 1;
// proposal for sub-network to choose
net_id = pearson_hash_32(comm->community, N2N_COMMUNITY_SIZE) % no_subnets;
net_id = pearson_hash_32((const uint8_t *)comm->community, N2N_COMMUNITY_SIZE) % no_subnets;
net_id = sss->min_auto_ip_net.net_addr + (net_id << (32 - sss->min_auto_ip_net.net_bitlen));
// check for availability starting from net_id, then downwards, ...

4
src/wire.c

@ -26,8 +26,8 @@
* example.
*/
#include "n2n_wire.h"
#include <string.h>
#include "n2n.h"
int encode_uint8( uint8_t * base,
size_t * idx,

Loading…
Cancel
Save