diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-08 20:30:44 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-09-08 20:30:44 +0200 |
commit | 80b1412c65a7a7e209c66684cf78e2ab13cfd5e6 (patch) | |
tree | a148c84c7eb41d25a9a1e709b47a84b43f26805c /src/protocols/ec25519_fhmqvc | |
parent | 58b8518100c8b306d5b6a3d87b4a83a1ae383a09 (diff) | |
download | fastd-80b1412c65a7a7e209c66684cf78e2ab13cfd5e6.tar fastd-80b1412c65a7a7e209c66684cf78e2ab13cfd5e6.zip |
Make stats of reordered packets
Diffstat (limited to 'src/protocols/ec25519_fhmqvc')
-rw-r--r-- | src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c index 6920b5e..8533c2b 100644 --- a/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c +++ b/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c @@ -112,15 +112,17 @@ static void protocol_handle_recv(fastd_peer_t *peer, fastd_buffer_t buffer) { goto fail; fastd_buffer_t recv_buffer; - bool ok = false; + bool ok = false, reordered; if (is_session_valid(&peer->protocol_state->old_session)) { - if (peer->protocol_state->old_session.method->provider->decrypt(peer, peer->protocol_state->old_session.method_state, &recv_buffer, buffer)) + reordered = false; + if (peer->protocol_state->old_session.method->provider->decrypt(peer, peer->protocol_state->old_session.method_state, &recv_buffer, buffer, &reordered)) ok = true; } if (!ok) { - if (peer->protocol_state->session.method->provider->decrypt(peer, peer->protocol_state->session.method_state, &recv_buffer, buffer)) { + reordered = false; + if (peer->protocol_state->session.method->provider->decrypt(peer, peer->protocol_state->session.method_state, &recv_buffer, buffer, &reordered)) { ok = true; if (peer->protocol_state->old_session.method) { @@ -150,7 +152,7 @@ static void protocol_handle_recv(fastd_peer_t *peer, fastd_buffer_t buffer) { fastd_peer_seen(peer); if (recv_buffer.len) - fastd_handle_receive(peer, recv_buffer); + fastd_handle_receive(peer, recv_buffer, reordered); else fastd_buffer_free(recv_buffer); |