From 315bbbff5376555ca1957a0442325ddafb9553f1 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 25 Jun 2015 03:16:52 +0000 Subject: - documentation, statistics about failures --- src/cadet/gnunet-service-cadet_connection.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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; -- cgit v1.2.3