mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-02 16:43:32 +01:00
don't try a dir fetch from a descriptorless bridge
When choosing a bridge to fetch directory info from, only select from among bridges whose descriptors we already have. In theory we don't need the bridge's descriptor to ask it for directory info, but in practice the code that does the fetching assumes we do. This mistake only slows down bootstrap, but shouldn't prevent it. Fixes bug 40746; bugfix on 0.3.0.3-alpha. (Specifically, commit 02da24f8e5.)
This commit is contained in:
parent
96521e8188
commit
7c629854a0
7
changes/bug40746
Normal file
7
changes/bug40746
Normal file
@ -0,0 +1,7 @@
|
||||
o Minor bugfixes (bridge users):
|
||||
- When choosing a bridge to fetch directory info from, only select
|
||||
from among bridges whose descriptors we already have. In theory we
|
||||
don't need the bridge's descriptor to ask it for directory info,
|
||||
but in practice the code that does the fetching assumes we do. This
|
||||
mistake only slows down bootstrap, but shouldn't prevent it. Fixes
|
||||
bug 40746; bugfix on 0.3.0.3-alpha.
|
@ -2105,7 +2105,8 @@ select_primary_guard_for_circuit(guard_selection_t *gs,
|
||||
const entry_guard_restriction_t *rst,
|
||||
unsigned *state_out)
|
||||
{
|
||||
const int need_descriptor = (usage == GUARD_USAGE_TRAFFIC);
|
||||
const int need_descriptor = (usage == GUARD_USAGE_TRAFFIC) ||
|
||||
get_options()->UseBridges;
|
||||
entry_guard_t *chosen_guard = NULL;
|
||||
|
||||
int num_entry_guards = get_n_primary_guards_to_use(usage);
|
||||
@ -2157,7 +2158,8 @@ select_confirmed_guard_for_circuit(guard_selection_t *gs,
|
||||
const entry_guard_restriction_t *rst,
|
||||
unsigned *state_out)
|
||||
{
|
||||
const int need_descriptor = (usage == GUARD_USAGE_TRAFFIC);
|
||||
const int need_descriptor = (usage == GUARD_USAGE_TRAFFIC) ||
|
||||
get_options()->UseBridges;
|
||||
|
||||
SMARTLIST_FOREACH_BEGIN(gs->confirmed_entry_guards, entry_guard_t *, guard) {
|
||||
if (guard->is_primary)
|
||||
|
Loading…
Reference in New Issue
Block a user