summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 01:26:03 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-01-26 01:26:03 +0100
commit8430688acb6e922bba903f04f560744736853c07 (patch)
treeb258e4a51d0ab29c11d505d3f07c53c455676ba6
parent02d87af372d0005fba7ded2ca186d852c02de468 (diff)
downloadfastd-8430688acb6e922bba903f04f560744736853c07.tar
fastd-8430688acb6e922bba903f04f560744736853c07.zip
ec25519-fhmqvc/handshake: use min_handshake_interval instead of hardcoding backoff timeout
-rw-r--r--src/protocols/ec25519_fhmqvc/handshake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/ec25519_fhmqvc/handshake.c b/src/protocols/ec25519_fhmqvc/handshake.c
index 4b70d9a..11c4443 100644
--- a/src/protocols/ec25519_fhmqvc/handshake.c
+++ b/src/protocols/ec25519_fhmqvc/handshake.c
@@ -517,7 +517,7 @@ static inline fastd_peer_t* add_temporary(fastd_context_t *ctx, const fastd_peer
static inline bool backoff(fastd_context_t *ctx, const fastd_peer_t *peer) {
return (peer->protocol_state && is_session_valid(ctx, &peer->protocol_state->session)
- && timespec_diff(&ctx->now, &peer->protocol_state->session.established) < 15000);
+ && timespec_diff(&ctx->now, &peer->protocol_state->session.established) < (int)ctx->conf->min_handshake_interval*1000);
}
void fastd_protocol_ec25519_fhmqvc_handshake_init(fastd_context_t *ctx, const fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, fastd_peer_t *peer) {