diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-03-26 09:17:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-03-26 09:17:50 -0400 |
commit | 33a80921a2e7bbf128c27a1a0c4903a9a322708a (patch) | |
tree | 0cb39ae00d37eb9043e8ea6cbadf9d8b47af4636 | |
parent | 3370b3cfef62cba8377285d95b232f810edde504 (diff) | |
download | tor-33a80921a2e7bbf128c27a1a0c4903a9a322708a.tar.gz tor-33a80921a2e7bbf128c27a1a0c4903a9a322708a.zip |
When extending a circuit's path length, clear onehop_tunnel.
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.
-rw-r--r-- | changes/bug24903 | 5 | ||||
-rw-r--r-- | src/or/control.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/changes/bug24903 b/changes/bug24903 new file mode 100644 index 0000000000..01c9b53f23 --- /dev/null +++ b/changes/bug24903 @@ -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. + diff --git a/src/or/control.c b/src/or/control.c index 03d9fcee2a..ff7f2e8b85 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -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; }); |