diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-29 19:04:31 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-29 19:04:31 +0200 |
commit | 7f33ccb920df2c308aa3076522bea683c66cb83d (patch) | |
tree | dd84a6fa62c936583cc8e28daf89e0713b4dd1ea /src/protocol_ec25519_fhmqvc.c | |
parent | 620f1cd45f44eb2dc2d9dd16bdf6ba4512a1bd69 (diff) | |
download | fastd-7f33ccb920df2c308aa3076522bea683c66cb83d.tar fastd-7f33ccb920df2c308aa3076522bea683c66cb83d.zip |
Don't initialize monotone timestamps with zero
The monotone timestamp is near zero on linux systems, confusing fastd.
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r-- | src/protocol_ec25519_fhmqvc.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) { |