]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When extending a circuit's path length, clear onehop_tunnel.
authorNick Mathewson <nickm@torproject.org>
Mon, 26 Mar 2018 13:17:50 +0000 (09:17 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 26 Mar 2018 13:17:50 +0000 (09:17 -0400)
There was a nonfatal assertion in pathbias_should_count that would
trigger if onehop_tunnel was set, but the desired_path_length was
greater than 1.  This patch fixes that.  Fixes bug 24903; bugfix on
0.2.5.2-alpha.

changes/bug24903 [new file with mode: 0644]
src/or/control.c

diff --git a/changes/bug24903 b/changes/bug24903
new file mode 100644 (file)
index 0000000..01c9b53
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes (controller, reliability):
+    - Avoid a (nonfatal) assertion failure when extending a one-hop circuit
+      from the controller to become a multihop circuit. Fixes bug 24903;
+      bugfix on 0.2.5.2-alpha.
+
index 03d9fcee2a6d766527c22c34a3bc510e862047e0..ff7f2e8b85cf83dff3e04723b3dcea90769922b4 100644 (file)
@@ -3364,6 +3364,9 @@ handle_control_extendcircuit(control_connection_t *conn, uint32_t len,
       tor_assert(info);
     }
     circuit_append_new_exit(circ, info);
+    if (circ->build_state->desired_path_len > 1) {
+      circ->build_state->onehop_tunnel = 0;
+    }
     extend_info_free(info);
     first_node = 0;
   });