diff options
author | teor <teor2345@gmail.com> | 2017-11-22 01:50:46 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-11-22 02:00:34 +1100 |
commit | 690f646bf8a5de9b099fb5295ba9ff252e5606f4 (patch) | |
tree | e45732bbcfbcde8fc5b3aa384f13ffc7a2d65cd3 /src/or/bridges.c | |
parent | da82e0b5795c449f4442c87e065e9a60da4892a8 (diff) | |
download | tor-690f646bf8a5de9b099fb5295ba9ff252e5606f4.tar.gz tor-690f646bf8a5de9b099fb5295ba9ff252e5606f4.zip |
Stop checking cached bridge descriptors for usable bridges
Stop checking for bridge descriptors when we actually want to know if
any bridges are usable. This avoids potential bootstrapping issues.
Fixes bug 24367; bugfix on 0.2.0.3-alpha.
Stop stalling when bridges are changed at runtime. Stop stalling when
old bridge descriptors are cached, but they are not in use.
Fixes bug 24367; bugfix on 23347 in 0.3.2.1-alpha.
Diffstat (limited to 'src/or/bridges.c')
-rw-r--r-- | src/or/bridges.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/or/bridges.c b/src/or/bridges.c index 320f5ee632..ac759493cc 100644 --- a/src/or/bridges.c +++ b/src/or/bridges.c @@ -835,34 +835,6 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache) } } -/** Return the number of bridges that have descriptors that - * are marked with purpose 'bridge' and are running. - * - * We use this function to decide if we're ready to start building - * circuits through our bridges, or if we need to wait until the - * directory "server/authority" requests finish. */ -MOCK_IMPL(int, -any_bridge_descriptors_known, (void)) -{ - if (BUG(!get_options()->UseBridges)) { - return 0; - } - - if (!bridge_list) - return 0; - - SMARTLIST_FOREACH_BEGIN(bridge_list, bridge_info_t *, bridge) { - const node_t *node; - if (!tor_digest_is_zero(bridge->identity) && - (node = node_get_by_id(bridge->identity)) != NULL && - node->ri) { - return 1; - } - } SMARTLIST_FOREACH_END(bridge); - - return 0; -} - /** Return a smartlist containing all bridge identity digests */ MOCK_IMPL(smartlist_t *, list_bridge_identities, (void)) |