This update is needed to make it consistent with the behavior of
node_awaiting_ipv6(), which doesn't believe in the addresses from
routerinfos unless it actually plans to use those routerinfos.
Fixes bug 25213; bugfix on
b66b62fb7525cac1e1 in 0.3.3.1-alpha,
which tightened up the definition of node_awaiting_ipv6().
--- /dev/null
+ 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.
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. */