summaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-23 08:02:48 -0500
committerNick Mathewson <nickm@torproject.org>2016-11-30 14:44:43 -0500
commit8edd3d2b6c43bd5eb64d79177e6e4c44ca4fc618 (patch)
tree512fd99b47772b9a1e5f0b65b51b2065835d1355 /src/or/circuituse.c
parentd98b9b6d65946e14ee325327d5beac1a60ace6cc (diff)
downloadtor-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/circuituse.c')
-rw-r--r--src/or/circuituse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index d2a7f20aa2..b9f94fb3a2 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -1633,7 +1633,8 @@ circuit_build_failed(origin_circuit_t *circ)
"Our circuit died before the first hop with no connection");
}
if (n_chan_id && !already_marked) {
- entry_guard_failed(get_guard_selection_info(), &circ->guard_state);
+ if (circ->guard_state)
+ entry_guard_failed(get_guard_selection_info(), &circ->guard_state);
/* XXXX prop271 -- old API */
entry_guard_register_connect_status(n_chan_id, 0, 1, time(NULL));
/* if there are any one-hop streams waiting on this circuit, fail