mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Merge remote-tracking branch 'arma/bug6769'
This commit is contained in:
commit
87e4b9259a
4
changes/bug20269
Normal file
4
changes/bug20269
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- When clients that use bridges start up with a cached consensus
|
||||||
|
on disk, they were ignoring it and downloading a new one. Now they
|
||||||
|
use the cached one. Fixes bug 20269; bugfix on 0.2.3.12-alpha.
|
5
changes/bug6769
Normal file
5
changes/bug6769
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Bridges and relays now use microdescriptors (like clients do)
|
||||||
|
rather than old-style router descriptors. Now bridges will blend in
|
||||||
|
with clients in terms of the circuits they build. Fixes bug 6769;
|
||||||
|
bugfix on 0.2.3.2-alpha.
|
@ -2521,27 +2521,6 @@ entries_retry_all(const or_options_t *options)
|
|||||||
entries_retry_helper(options, 1);
|
entries_retry_helper(options, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return true if at least one of our bridges runs a Tor version that can
|
|
||||||
* provide microdescriptors to us. If not, we'll fall back to asking for
|
|
||||||
* full descriptors. */
|
|
||||||
int
|
|
||||||
any_bridge_supports_microdescriptors(void)
|
|
||||||
{
|
|
||||||
const node_t *node;
|
|
||||||
if (!get_options()->UseBridges || !entry_guards)
|
|
||||||
return 0;
|
|
||||||
SMARTLIST_FOREACH_BEGIN(entry_guards, entry_guard_t *, e) {
|
|
||||||
node = node_get_by_id(e->identity);
|
|
||||||
if (node && node->is_running &&
|
|
||||||
node_is_bridge(node) && node_is_a_configured_bridge(node)) {
|
|
||||||
/* This is one of our current bridges, and we know enough about
|
|
||||||
* it to know that it will be able to answer our questions. */
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
} SMARTLIST_FOREACH_END(e);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Release all storage held by the list of entry guards and related
|
/** Release all storage held by the list of entry guards and related
|
||||||
* memory structs. */
|
* memory structs. */
|
||||||
void
|
void
|
||||||
|
@ -143,7 +143,6 @@ int any_bridge_descriptors_known(void);
|
|||||||
int entries_known_but_down(const or_options_t *options);
|
int entries_known_but_down(const or_options_t *options);
|
||||||
void entries_retry_all(const or_options_t *options);
|
void entries_retry_all(const or_options_t *options);
|
||||||
|
|
||||||
int any_bridge_supports_microdescriptors(void);
|
|
||||||
const smartlist_t *get_socks_args_by_bridge_addrport(const tor_addr_t *addr,
|
const smartlist_t *get_socks_args_by_bridge_addrport(const tor_addr_t *addr,
|
||||||
uint16_t port);
|
uint16_t port);
|
||||||
|
|
||||||
|
@ -917,20 +917,9 @@ update_microdescs_from_networkstatus(time_t now)
|
|||||||
int
|
int
|
||||||
we_use_microdescriptors_for_circuits(const or_options_t *options)
|
we_use_microdescriptors_for_circuits(const or_options_t *options)
|
||||||
{
|
{
|
||||||
int ret = options->UseMicrodescriptors;
|
if (options->UseMicrodescriptors == 0)
|
||||||
if (ret == -1) {
|
return 0; /* the user explicitly picked no */
|
||||||
/* UseMicrodescriptors is "auto"; we need to decide: */
|
return 1; /* yes and auto both mean yes */
|
||||||
/* If we are configured to use bridges and none of our bridges
|
|
||||||
* know what a microdescriptor is, the answer is no. */
|
|
||||||
if (options->UseBridges && !any_bridge_supports_microdescriptors())
|
|
||||||
return 0;
|
|
||||||
/* Otherwise, we decide that we'll use microdescriptors iff we are
|
|
||||||
* not a server, and we're not autofetching everything. */
|
|
||||||
/* XXXX++ what does not being a server have to do with it? also there's
|
|
||||||
* a partitioning issue here where bridges differ from clients. */
|
|
||||||
ret = !server_mode(options) && !options->FetchUselessDescriptors;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return true iff we should try to download microdescriptors at all. */
|
/** Return true iff we should try to download microdescriptors at all. */
|
||||||
|
Loading…
Reference in New Issue
Block a user