[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 27/40: TNG: Fixed validation bug.
From: |
gnunet |
Subject: |
[gnunet] 27/40: TNG: Fixed validation bug. |
Date: |
Thu, 05 Oct 2023 08:57:30 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 88cb4be25d61a15398db89e539311a80ebe74c8f
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Tue Oct 3 11:20:32 2023 +0200
TNG: Fixed validation bug.
---
src/transport/gnunet-service-tng.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/transport/gnunet-service-tng.c
b/src/transport/gnunet-service-tng.c
index 69dab525a..138d8ee3f 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -8626,7 +8626,7 @@ start_address_validation (const struct
GNUNET_PeerIdentity *pid,
}
return;
}
- now = GNUNET_TIME_absolute_get ();
+ now = GNUNET_TIME_absolute_get_monotonic (GST_cfg);
vs = GNUNET_new (struct ValidationState);
vs->pid = *pid;
vs->valid_until =
@@ -9009,6 +9009,19 @@ handle_validation_response (
vs->validated_until,
GNUNET_TIME_relative_multiply (vs->validation_rtt,
VALIDATION_RTT_BUFFER_FACTOR));
+ if (GNUNET_TIME_absolute_cmp (vs->first_challenge_use, <, now))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "First challenge use is now %" PRIu64 " %s \n",
+ vs->first_challenge_use.abs_value_us,
+ GNUNET_sh2s (&vs->challenge.value));
+ vs->first_challenge_use = now;
+ }
+ else
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "First challenge use is later %" PRIu64 " %s \n",
+ vs->first_challenge_use.abs_value_us,
+ GNUNET_sh2s (&vs->challenge.value));
vs->last_challenge_use =
GNUNET_TIME_UNIT_ZERO_ABS; /* challenge was not yet used */
update_next_challenge_time (vs, vs->first_challenge_use);
@@ -10650,6 +10663,8 @@ validation_start_cb (void *cls)
{
struct ValidationState *vs;
struct Queue *q;
+ const struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get_monotonic (
+ GST_cfg);
(void) cls;
validation_task = NULL;
@@ -10673,6 +10688,13 @@ validation_start_cb (void *cls)
happen if we're really a lonely peer */
}
q = find_queue (&vs->pid, vs->address);
+ if (GNUNET_TIME_absolute_cmp (vs->first_challenge_use, >, now))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "To early to start next address validation for challenge %s\n",
+ GNUNET_sh2s (&vs->challenge.value));
+ return;
+ }
if (NULL == q)
{
vs->awaiting_queue = GNUNET_YES;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 14/40: NEWS: Added api to store hellos with peerstore service., (continued)
- [gnunet] 14/40: NEWS: Added api to store hellos with peerstore service., gnunet, 2023/10/05
- [gnunet] 20/40: PEERSTORE: Moved code to scan and import hello file into peerstore from peerinfo., gnunet, 2023/10/05
- [gnunet] 26/40: Peerstore: Fixed bug in bootstrap code, gnunet, 2023/10/05
- [gnunet] 28/40: DHT: Fixed wrong group name, gnunet, 2023/10/05
- [gnunet] 11/40: CORE: Fixed bug that core is not calling GNUNET_TRANSPORT_core_receive_continue, gnunet, 2023/10/05
- [gnunet] 15/40: NEWS: Added api to get notified when hellos are stored with peerstore service., gnunet, 2023/10/05
- [gnunet] 08/40: TNG: Added generic start script for test cases., gnunet, 2023/10/05
- [gnunet] 21/40: NEWS: Moved code to testing to have more generic test setup, which can be used not only from within transport., gnunet, 2023/10/05
- [gnunet] 23/40: NEWS: Changed method GNUNET_HELLO_builder_get_expiration_time to not need parameter GNUNET_HELLO_Builder., gnunet, 2023/10/05
- [gnunet] 24/40: Peerstore: Changed the behavior of GNUNET_PEERSTORE_watch to also return the values allready stored for the key., gnunet, 2023/10/05
- [gnunet] 27/40: TNG: Fixed validation bug.,
gnunet <=
- [gnunet] 35/40: Remove old transport struct definitions, gnunet, 2023/10/05
- [gnunet] 04/40: NEWS: Removed all usage of old transport api, beside peerinfo tool, gnunet-transport cli and usage in transport layer itself., gnunet, 2023/10/05
- [gnunet] 34/40: Remove most of old transport, ATS and PEERINFO. Disable TESTBED and related tests, gnunet, 2023/10/05