diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-22 19:44:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-22 19:44:27 -0400 |
commit | 6773102c92e7bd9d949251da75bcc0762e754ab2 (patch) | |
tree | 310631258357320bbee56d488b6397d5facbb554 /src/or/entrynodes.c | |
parent | d8ac7d557c0af199d21639a52a8c8c9dd201f555 (diff) | |
parent | 0941c8bfe6f34024153ae3ed67e4b1a05f9a6bfe (diff) | |
download | tor-6773102c92e7bd9d949251da75bcc0762e754ab2.tar.gz tor-6773102c92e7bd9d949251da75bcc0762e754ab2.zip |
Merge branch 'bug25691_033_again_squashed'
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 88d1b94deb..96e6ccaace 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -185,14 +185,14 @@ should_apply_guardfraction(const networkstatus_t *ns) return options->UseGuardFraction; } -/** Return true iff we know a descriptor for <b>guard</b> */ +/** Return true iff we know a preferred descriptor for <b>guard</b> */ static int guard_has_descriptor(const entry_guard_t *guard) { const node_t *node = node_get_by_id(guard->identity); if (!node) return 0; - return node_has_descriptor(node); + return node_has_preferred_descriptor(node, 1); } /** @@ -2269,7 +2269,8 @@ entry_guard_pick_for_circuit(guard_selection_t *gs, // XXXX #20827 check Ed ID. if (! node) goto fail; - if (BUG(usage != GUARD_USAGE_DIRGUARD && !node_has_descriptor(node))) + if (BUG(usage != GUARD_USAGE_DIRGUARD && + !node_has_preferred_descriptor(node, 1))) goto fail; *chosen_node_out = node; |