summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-06-25 03:16:52 +0000
committerBart Polot <bart@net.in.tum.de>2015-06-25 03:16:52 +0000
commit315bbbff5376555ca1957a0442325ddafb9553f1 (patch)
tree8980dd7d42ba985b61a31cd7c06d53b7e6ec621e /src
parent8115286b9e786fd7b54e28306f993ef49c1d98d0 (diff)
- documentation, statistics about failures
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index a4ad87ed1..c446b05f6 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1800,10 +1800,17 @@ GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer,
path = path_build_from_peer_ids ((struct GNUNET_PeerIdentity *) &msg[1],
size, myid, &own_pos);
if (NULL == path)
+ {
+ /* Path was malformed, probably our own ID was not in it. */
+ GNUNET_STATISTICS_update (stats, "# malformed paths", 1, GNUNET_NO);
+ GNUNET_break_op (0);
return GNUNET_OK;
+ }
if (0 == own_pos)
{
+ /* We received this request from a neighbor, we cannot be origin */
+ GNUNET_STATISTICS_update (stats, "# fake paths", 1, GNUNET_NO);
GNUNET_break_op (0);
path_destroy (path);
return GNUNET_OK;