]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't launch a useless circuit in rend_client_reextend_intro_circuit
authorRobert Ransom <rransom.8774@gmail.com>
Mon, 10 Oct 2011 03:24:27 +0000 (20:24 -0700)
committerRobert Ransom <rransom.8774@gmail.com>
Mon, 10 Oct 2011 10:05:19 +0000 (03:05 -0700)
Fixes bug 4212.  Bug reported by katmagic and found by Sebastian.

changes/bug4212 [new file with mode: 0644]
src/or/rendclient.c

diff --git a/changes/bug4212 b/changes/bug4212
new file mode 100644 (file)
index 0000000..6222a59
--- /dev/null
@@ -0,0 +1,13 @@
+  o Major bugfixes:
+
+    - Don't launch a useless circuit after failing to use one of a
+      hidden service's introduction points.  Previously, we would
+      launch a new introduction circuit, but not set the hidden
+      service which that circuit was intended to connect to, so it
+      would never actually be used.  A different piece of code would
+      then create a new introduction circuit correctly, so this bug
+      was harmless until it caused an assertion in the client-side
+      part of the #3825 fix to fail.  Bug reported by katmagic and
+      found by Sebastian Hahn.  Bugfix on 0.2.1.13-alpha; fixes bug
+      4212.
+
index 533dfb8a970648fd7d8ba519d8274ec883a62080..9c247f5c71f7554bc8c43f4bcac66b6340916aca 100644 (file)
@@ -106,17 +106,11 @@ rend_client_reextend_intro_circuit(origin_circuit_t *circ)
     result = circuit_extend_to_new_exit(circ, extend_info);
   } else {
     log_info(LD_REND,
-             "Building a new introduction circuit, this time to %s.",
-             safe_str_client(extend_info_describe(extend_info)));
+             "Closing intro circ %d (out of RELAY_EARLY cells).",
+             circ->_base.n_circ_id);
     circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
-    if (!circuit_launch_by_extend_info(CIRCUIT_PURPOSE_C_INTRODUCING,
-                                       extend_info,
-                                       CIRCLAUNCH_IS_INTERNAL)) {
-      log_warn(LD_REND, "Building introduction circuit failed.");
-      result = -1;
-    } else {
-      result = 0;
-    }
+    /* connection_ap_handshake_attach_circuit will launch a new intro circ. */
+    result = 0;
   }
   extend_info_free(extend_info);
   return result;