X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=43895dda251fe87c72a2c7f8c467357305e03048;hb=6debc6c79ba385d35f646e0958f84ace5b8f4b4d;hp=d2adc13f32a1b220527bdce4a1a4c495c848d2c3;hpb=a80253aee68968c722c796c523ed26655d29c882;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index d2adc13f..43895dda 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -28,6 +28,7 @@ #include "connection.h" #include "compression.h" #include "control.h" +#include "crypto.h" #include "device.h" #include "digest.h" #include "ecdsa.h" @@ -142,7 +143,7 @@ static timeout_t keyexpire_timeout; static void keyexpire_handler(void *data) { regenerate_key(); timeout_set(data, &(struct timeval) { - keylifetime, rand() % 100000 + keylifetime, jitter() }); } #endif @@ -834,7 +835,7 @@ static bool setup_myself(void) { free(cipher); timeout_add(&keyexpire_timeout, keyexpire_handler, &keyexpire_timeout, &(struct timeval) { - keylifetime, rand() % 100000 + keylifetime, jitter() }); /* Check if we want to use message authentication codes... */