From 8430688acb6e922bba903f04f560744736853c07 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 26 Jan 2014 01:26:03 +0100 Subject: ec25519-fhmqvc/handshake: use min_handshake_interval instead of hardcoding backoff timeout --- src/protocols/ec25519_fhmqvc/handshake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) { -- cgit v1.2.3