X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol.c;h=8f0efb2a32e5f008f89c4d2a54449ef0307e30b1;hb=6debc6c79ba385d35f646e0958f84ace5b8f4b4d;hp=7de75b931a868690861d355e194e58e46801f5b7;hpb=a80253aee68968c722c796c523ed26655d29c882;p=tinc diff --git a/src/protocol.c b/src/protocol.c index 7de75b93..8f0efb2a 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -22,9 +22,11 @@ #include "conf.h" #include "connection.h" +#include "crypto.h" #include "logger.h" #include "meta.h" #include "protocol.h" +#include "utils.h" #include "xalloc.h" bool tunnelserver = false; @@ -191,7 +193,7 @@ static void age_past_requests(void *data) { if(left) timeout_set(&past_request_timeout, &(struct timeval) { - 10, rand() % 100000 + 10, jitter() }); } @@ -209,7 +211,7 @@ bool seen_request(const char *request) { new->firstseen = now.tv_sec; splay_insert(&past_request_tree, new); timeout_add(&past_request_timeout, age_past_requests, NULL, &(struct timeval) { - 10, rand() % 100000 + 10, jitter() }); return false; }