gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17808 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r17808 - gnunet/src/mesh
Date: Thu, 27 Oct 2011 03:05:23 +0200

Author: bartpolot
Date: 2011-10-27 03:05:23 +0200 (Thu, 27 Oct 2011)
New Revision: 17808

Modified:
   gnunet/src/mesh/mesh_api_new.c
Log:
Fixed #1856, added extra check for tunnel local numbering

Modified: gnunet/src/mesh/mesh_api_new.c
===================================================================
--- gnunet/src/mesh/mesh_api_new.c      2011-10-27 00:47:57 UTC (rev 17807)
+++ gnunet/src/mesh/mesh_api_new.c      2011-10-27 01:05:23 UTC (rev 17808)
@@ -683,6 +683,14 @@
     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 @@
   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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]