diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-01-03 23:16:06 +1100 |
---|---|---|
committer | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-01-29 07:15:53 +1100 |
commit | 4528f893163ad7ab27915451caf23b3a722413ce (patch) | |
tree | 77b76975f5bce9464b6c7599d3591cea4fbb77a6 /src/or/entrynodes.c | |
parent | 16486662038de53c482cd6f50a30505f2bf20453 (diff) | |
download | tor-4528f893163ad7ab27915451caf23b3a722413ce.tar.gz tor-4528f893163ad7ab27915451caf23b3a722413ce.zip |
Make entry_guard_set_status consistent with entry_is_live
Check fascist_firewall_allows_node in entry_guard_set_status and
return the same message as entry_is_live.
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 583b7efa8b..1ce44d1026 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -87,7 +87,7 @@ get_entry_guards(void) /** Check whether the entry guard <b>e</b> is usable, given the directory * authorities' opinion about the router (stored in <b>ri</b>) and the user's - * configuration (in <b>options</b>). Set <b>e</b>->bad_since + * configuration (in <b>options</b>). Set <b>e</b>->bad_since * accordingly. Return true iff the entry guard's status changes. * * If it's not usable, set *<b>reason</b> to a static string explaining why. @@ -117,6 +117,9 @@ entry_guard_set_status(entry_guard_t *e, const node_t *node, *reason = "not recommended as a guard"; else if (routerset_contains_node(options->ExcludeNodes, node)) *reason = "excluded"; + /* We only care about OR connection connectivity for entry guards. */ + else if (!fascist_firewall_allows_node(node, FIREWALL_OR_CONNECTION, 0)) + *reason = "unreachable by config"; else if (e->path_bias_disabled) *reason = "path-biased"; |