]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use single-hop intro and rend circuits when in tor2web mode
authorRobert Ransom <rransom.8774@gmail.com>
Wed, 1 Jun 2011 09:00:59 +0000 (02:00 -0700)
committerNick Mathewson <nickm@torproject.org>
Wed, 30 Nov 2011 19:54:15 +0000 (14:54 -0500)
src/or/circuituse.c

index 23efe05348a62015f28db81dcd3b9d47a06240dc..f9931d88d6d494a81128209913a3a92eee0e32ad 100644 (file)
@@ -1489,6 +1489,12 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
     else
       new_circ_purpose = desired_circuit_purpose;
 
+    if (options->Tor2webMode &&
+        (new_circ_purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND ||
+         new_circ_purpose == CIRCUIT_PURPOSE_C_INTRODUCING)) {
+      want_onehop = 1;
+    }
+
     {
       int flags = CIRCLAUNCH_NEED_CAPACITY;
       if (want_onehop) flags |= CIRCLAUNCH_ONEHOP_TUNNEL;