Merge branch 'maint-0.3.3' into release-0.3.3

This commit is contained in:
Nick Mathewson 2018-03-27 07:05:15 -04:00
commit d5580d9a27
3 changed files with 21 additions and 2 deletions

5
changes/bug25213 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (warnings, ipv6):
- Avoid a bug warning that could occur when trying to connect to
a relay over IPv6 on a Tor instance that downloads router descriptors,
but prefers to use microdescriptors. Fixes bug 25213; bugfix on
0.3.3.1-alpha.

View File

@ -2857,8 +2857,18 @@ extend_info_from_node(const node_t *node, int for_direct_connect)
tor_addr_port_t ap;
int valid_addr = 0;
if (node->ri == NULL && (node->rs == NULL || node->md == NULL))
return NULL;
const int is_bridge = node_is_a_configured_bridge(node);
const int we_use_mds = we_use_microdescriptors_for_circuits(get_options());
if (is_bridge || !we_use_mds) {
/* We need an ri in this case. */
if (!node->ri)
return NULL;
} else {
/* Otherwise we need an md. */
if (node->rs == NULL || node->md == NULL)
return NULL;
}
/* Choose a preferred address first, but fall back to an allowed address.
* choose_address returns 1 on success, but get_prim_orport returns 0. */

View File

@ -1237,6 +1237,10 @@ test_build_update_descriptors(void *arg)
node->is_running = node->is_valid = node->is_fast = node->is_stable = 1;
}
/* We have to set thise, or the lack of microdescriptors for these
* nodes will make them unusable. */
get_options_mutable()->UseMicrodescriptors = 0;
/* We expect to pick only one intro point from the node above. */
setup_full_capture_of_logs(LOG_INFO);
update_all_descriptors(now);