Browse Source

Telescoping WO can now construct looped circuits

It was incorrectly checking before that the index it picked to extend to
wasn't part of the guard's range, but that range was for an old epoch.
So now it just does like single-pass: give it a try, and check at the
end whether you were unlucky and got a loop.
Ian Goldberg 4 years ago
parent
commit
a92ec0c0aa
1 changed files with 1 additions and 9 deletions
  1. 1 9
      client.py

+ 1 - 9
client.py

@@ -372,21 +372,13 @@ class ClientChannelManager(relay.ChannelManager):
             logging.debug("Circuit was already closed, not sending bytes. circid: " + str(circid))
             return None
 
-        # In Telescoping Walking Onions, it should never happen that the
-        # guard and exit are the same node, as the
-        # TelescopingExtendedHandler takes care to not pick an index for
-        # the exit that matches the guard's range.  So this test should
-        # never trigger.  In Single-Pass Walking Onions, however, the
-        # equivalent test is needed here (but should just log a debug,
-        # not an error, since the client cannot control the index value
-        # selected for the exit.
         guard = circhandler.circuit_descs[0]
         if type(guard) is dirauth.RelayDescriptor:
             guardd = guard.descdict
         else:
             guardd = guard.snipdict
         if guardd["addr"] == circhandler.circuit_descs[2].snipdict["addr"]:
-            logging.error("CIRCUIT IN A LOOP")
+            logging.debug("circuit in a loop")
             circhandler.close()
             circhandler = None