[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: Better cycle checking in pa
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: Better cycle checking in path from DHT |
Date: |
Thu, 28 Dec 2017 01:36:35 +0100 |
This is an automated email from the git hooks/post-receive script.
david-barksdale pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new f4f75ed70 Better cycle checking in path from DHT
f4f75ed70 is described below
commit f4f75ed70d46464bf613d87d71552770fab8b6bf
Author: David Barksdale <address@hidden>
AuthorDate: Wed Dec 27 18:35:48 2017 -0600
Better cycle checking in path from DHT
---
src/cadet/gnunet-service-cadet_paths.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/cadet/gnunet-service-cadet_paths.c
b/src/cadet/gnunet-service-cadet_paths.c
index 7b90fe152..0ec7ff3d7 100644
--- a/src/cadet/gnunet-service-cadet_paths.c
+++ b/src/cadet/gnunet-service-cadet_paths.c
@@ -501,6 +501,14 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity
*get_path,
pid = (off < get_path_length)
? &get_path[get_path_length - off - 1]
: &put_path[get_path_length + put_path_length - off - 1];
+ /* Check that I am not in the path */
+ if (0 == memcmp (&my_full_id,
+ pid,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ skip = off + 1;
+ continue;
+ }
cpath[off - skip] = GCP_get (pid,
GNUNET_YES);
/* Check that no peer is twice on the path */
@@ -513,6 +521,12 @@ GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity
*get_path,
}
}
}
+ if (skip >= total_len)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Path discovered from DHT is one big cycle?\n");
+ return;
+ }
total_len -= skip;
/* First figure out if this path is a subset of an existing path, an
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: Better cycle checking in path from DHT,
gnunet <=