diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-06-05 00:44:05 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-06-05 00:44:05 +0200 |
commit | 450bbeb8a00cc695cc2c62f48c821388d6191e00 (patch) | |
tree | 8341bee2e730850ab0c8e8fb37f5d7c2e083e4db /src/protocol_ec25519_fhmqvc.c | |
parent | b6b6e059d7343165633eda7b3b4605220751d2dd (diff) | |
download | fastd-450bbeb8a00cc695cc2c62f48c821388d6191e00.tar fastd-450bbeb8a00cc695cc2c62f48c821388d6191e00.zip |
Add support for receiving reordered packets
Diffstat (limited to 'src/protocol_ec25519_fhmqvc.c')
-rw-r--r-- | src/protocol_ec25519_fhmqvc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol_ec25519_fhmqvc.c b/src/protocol_ec25519_fhmqvc.c index 31cf2b6..64d941c 100644 --- a/src/protocol_ec25519_fhmqvc.c +++ b/src/protocol_ec25519_fhmqvc.c @@ -637,12 +637,12 @@ static void protocol_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buf bool ok = false; if (is_session_valid(ctx, &peer->protocol_state->old_session)) { - if (ctx->conf->method->decrypt(ctx, peer->protocol_state->old_session.method_state, &recv_buffer, buffer)) + if (ctx->conf->method->decrypt(ctx, peer, peer->protocol_state->old_session.method_state, &recv_buffer, buffer)) ok = true; } if (!ok) { - if (ctx->conf->method->decrypt(ctx, peer->protocol_state->session.method_state, &recv_buffer, buffer)) { + if (ctx->conf->method->decrypt(ctx, peer, peer->protocol_state->session.method_state, &recv_buffer, buffer)) { ok = true; if (peer->protocol_state->old_session.method_state) { @@ -698,7 +698,7 @@ static void protocol_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buf } fastd_buffer send_buffer; - if (!ctx->conf->method->encrypt(ctx, session->method_state, &send_buffer, buffer)) + if (!ctx->conf->method->encrypt(ctx, peer, session->method_state, &send_buffer, buffer)) goto fail; fastd_send(ctx, &peer->address, send_buffer); |