summaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-10-27 01:05:23 +0000
committerBart Polot <bart@net.in.tum.de>2011-10-27 01:05:23 +0000
commita5777dcaa4cd80af1f0a25475e74feec41793218 (patch)
tree76dfeb1a95ec4058757f7160e76b7e1de9d7f17b /src/mesh
parent8011a0ed49033321c4551d64e299b9d41b40ebc3 (diff)
Fixed #1856, added extra check for tunnel local numbering
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh_api_new.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesh/mesh_api_new.c b/src/mesh/mesh_api_new.c
index 64f880e06..bfdd902b7 100644
--- a/src/mesh/mesh_api_new.c
+++ b/src/mesh/mesh_api_new.c
@@ -683,6 +683,14 @@ reconnect (struct GNUNET_MESH_Handle *h)
struct GNUNET_MESH_TunnelMessage tmsg;
struct GNUNET_MESH_PeerControl pmsg;
+ if (t->tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
+ {
+ /* Tunnel was created by service (incoming tunnel) */
+ /* TODO: Notify service of missing tunnel, to request
+ * creator to recreate path (find a path to him via DHT?)
+ */
+ continue;
+ }
tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
tmsg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
tmsg.tunnel_id = htonl (t->tid);
@@ -753,7 +761,7 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h,
MESH_TunnelNumber tid;
tid = ntohl (msg->tunnel_id);
- if (tid <= GNUNET_MESH_LOCAL_TUNNEL_ID_CLI)
+ if (tid < GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
{
GNUNET_break (0);
return;