diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-23 08:02:48 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-30 14:44:43 -0500 |
commit | 8edd3d2b6c43bd5eb64d79177e6e4c44ca4fc618 (patch) | |
tree | 512fd99b47772b9a1e5f0b65b51b2065835d1355 /src/or/circuitbuild.c | |
parent | d98b9b6d65946e14ee325327d5beac1a60ace6cc (diff) | |
download | tor-8edd3d2b6c43bd5eb64d79177e6e4c44ca4fc618.tar.gz tor-8edd3d2b6c43bd5eb64d79177e6e4c44ca4fc618.zip |
Don't call into the new guard algorithm when the old one is enabled.
(I'm surprised that these are the only bugs I ran into when I
tested running with the old algorithm again!)
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 2f4ce7a727..16b53f6e21 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -965,7 +965,10 @@ circuit_send_next_onion_skin(origin_circuit_t *circ) if (!hop) { /* done building the circuit. whew. */ int r; - if (! circ->guard_state) { + if (get_options()->UseDeprecatedGuardAlgorithm) { + // The circuit is usable; we already marked the guard as okay. + r = 1; + } else if (! circ->guard_state) { if (circuit_get_cpath_len(circ) != 1) { log_warn(LD_BUG, "%d-hop circuit %p with purpose %d has no " "guard state", |