diff options
author | Roger Dingledine <arma@torproject.org> | 2012-01-27 17:22:31 -0500 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2012-01-27 17:22:31 -0500 |
commit | b1ee1927b124aa63d91cdc8feda7fb7e3d4bd05f (patch) | |
tree | 284f9fbb2be6d0775109e4e0c0d48bf4158bcfb8 | |
parent | a0f0897795c45d22ad2d2dde98c81195a9db24dc (diff) | |
download | tor-b1ee1927b124aa63d91cdc8feda7fb7e3d4bd05f.tar.gz tor-b1ee1927b124aa63d91cdc8feda7fb7e3d4bd05f.zip |
if we ever have an old bridge, never again use microdescs
should reduce the risk of oscillation if our 0.2.2 bridge comes and goes
-rw-r--r-- | src/or/circuitbuild.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 70e35967e6..07598e242f 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -5328,7 +5328,7 @@ entries_retry_all(const or_options_t *options) entries_retry_helper(options, 1); } -/** Return true if one of our bridges is running a Tor version that can't +/** Return true if we've ever had a bridge running a Tor version that can't * provide microdescriptors to us. In that case fall back to asking for * full descriptors. Eventually all bridges will support microdescriptors * and we can take this check out; see bug 4013. */ @@ -5336,8 +5336,11 @@ int any_bridges_dont_support_microdescriptors(void) { const node_t *node; + static int ever_answered_yes = 0; if (!get_options()->UseBridges || !entry_guards) return 0; + if (ever_answered_yes) + return 1; /* if we ever answer 'yes', always answer 'yes' */ SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, e) { node = node_get_by_id(e->identity); if (node && node->ri && @@ -5346,6 +5349,7 @@ any_bridges_dont_support_microdescriptors(void) /* This is one of our current bridges, and we know enough about * it to know that it won't be able to answer our microdescriptor * questions. */ + ever_answered_yes = 1; return 1; } } SMARTLIST_FOREACH_END(e); |