From 7f33ccb920df2c308aa3076522bea683c66cb83d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 29 Aug 2013 19:04:31 +0200 Subject: Don't initialize monotone timestamps with zero The monotone timestamp is near zero on linux systems, confusing fastd. --- src/protocol_ec25519_fhmqvc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/protocol_ec25519_fhmqvc.c') diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index bb75404..73fbc5e 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -240,8 +240,12 @@ static bool protocol_peer_check_temporary(fastd_context_t *ctx, fastd_peer_t *pe } static void init_protocol_state(fastd_context_t *ctx) { - if (!ctx->protocol_state) + if (!ctx->protocol_state) { ctx->protocol_state = calloc(1, sizeof(fastd_protocol_state_t)); + + ctx->protocol_state->prev_handshake_key.preferred_till = ctx->conf->long_ago; + ctx->protocol_state->handshake_key.preferred_till = ctx->conf->long_ago; + } } static void new_handshake_key(fastd_context_t *ctx, keypair_t *key) { -- cgit v1.2.3