aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-22 19:44:27 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-22 19:44:27 -0400
commit6773102c92e7bd9d949251da75bcc0762e754ab2 (patch)
tree310631258357320bbee56d488b6397d5facbb554 /src/or/circuituse.c
parentd8ac7d557c0af199d21639a52a8c8c9dd201f555 (diff)
parent0941c8bfe6f34024153ae3ed67e4b1a05f9a6bfe (diff)
downloadtor-6773102c92e7bd9d949251da75bcc0762e754ab2.tar.gz
tor-6773102c92e7bd9d949251da75bcc0762e754ab2.zip
Merge branch 'bug25691_033_again_squashed'
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r--src/or/circuituse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index fe28dd9a1a..47e29c28dd 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -2383,7 +2383,7 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
const node_t *r;
int opt = conn->chosen_exit_optional;
r = node_get_by_nickname(conn->chosen_exit_name, 0);
- if (r && node_has_descriptor(r)) {
+ if (r && node_has_preferred_descriptor(r, conn->want_onehop ? 1 : 0)) {
/* We might want to connect to an IPv6 bridge for loading
descriptors so we use the preferred address rather than
the primary. */
@@ -2393,7 +2393,7 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
"Discarding this circuit.", conn->chosen_exit_name);
return -1;
}
- } else { /* ! (r && node_has_descriptor(r)) */
+ } else { /* ! (r && node_has_preferred_descriptor(...)) */
log_debug(LD_DIR, "considering %d, %s",
want_onehop, conn->chosen_exit_name);
if (want_onehop && conn->chosen_exit_name[0] == '$') {