mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 06:33:44 +01:00
Merge remote branch 'origin/maint-0.2.2' for bug 1859 patches
Some of this is already done in nodelist.
This commit is contained in:
commit
f32140238f
9
changes/bug1859
Normal file
9
changes/bug1859
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Bring the logic that gathers routerinfos and assesses the
|
||||||
|
acceptability of circuits into line. This prevents a Tor OP from getting
|
||||||
|
locked in a cycle of choosing its local OR as an exit for a path (due to
|
||||||
|
a .exit request) and then rejecting the circuit because its OR is not
|
||||||
|
listed yet. Also prevent Tor clients from using an OR running in the same
|
||||||
|
instance as an exit (due to a .exit request) if the OR does not meet the
|
||||||
|
same requirements expected of an OR running elsewhere.
|
||||||
|
Fixes bug 1859; bugfix on 0.2.0-alpha.
|
@ -600,7 +600,7 @@ circuit_discard_optional_exit_enclaves(extend_info_t *info)
|
|||||||
!edge_conn->chosen_exit_retries)
|
!edge_conn->chosen_exit_retries)
|
||||||
continue;
|
continue;
|
||||||
r1 = node_get_by_nickname(edge_conn->chosen_exit_name, 0);
|
r1 = node_get_by_nickname(edge_conn->chosen_exit_name, 0);
|
||||||
r2 = node_get_by_nickname(info->nickname, 0);
|
r2 = node_get_by_id(info->identity_digest);
|
||||||
if (!r1 || !r2 || r1 != r2)
|
if (!r1 || !r2 || r1 != r2)
|
||||||
continue;
|
continue;
|
||||||
tor_assert(edge_conn->socks_request);
|
tor_assert(edge_conn->socks_request);
|
||||||
|
@ -755,7 +755,11 @@ rend_client_get_random_intro(const rend_data_t *rend_query)
|
|||||||
intro = smartlist_get(entry->parsed->intro_nodes, i);
|
intro = smartlist_get(entry->parsed->intro_nodes, i);
|
||||||
/* Do we need to look up the router or is the extend info complete? */
|
/* Do we need to look up the router or is the extend info complete? */
|
||||||
if (!intro->extend_info->onion_key) {
|
if (!intro->extend_info->onion_key) {
|
||||||
const node_t *node = node_get_by_nickname(intro->extend_info->nickname, 0);
|
const node_t *node;
|
||||||
|
if (tor_digest_is_zero(intro->extend_info->identity_digest))
|
||||||
|
node = node_get_by_hex_id(intro->extend_info->nickname);
|
||||||
|
else
|
||||||
|
node = node_get_by_id(intro->extend_info->identity_digest);
|
||||||
if (!node) {
|
if (!node) {
|
||||||
log_info(LD_REND, "Unknown router with nickname '%s'; trying another.",
|
log_info(LD_REND, "Unknown router with nickname '%s'; trying another.",
|
||||||
intro->extend_info->nickname);
|
intro->extend_info->nickname);
|
||||||
|
@ -2316,9 +2316,6 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed)
|
|||||||
return router_get_by_hexdigest(nickname);
|
return router_get_by_hexdigest(nickname);
|
||||||
if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME))
|
if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (server_mode(get_options()) &&
|
|
||||||
!strcasecmp(nickname, get_options()->Nickname))
|
|
||||||
return router_get_my_routerinfo();
|
|
||||||
|
|
||||||
maybedigest = (strlen(nickname) >= HEX_DIGEST_LEN) &&
|
maybedigest = (strlen(nickname) >= HEX_DIGEST_LEN) &&
|
||||||
(base16_decode(digest,DIGEST_LEN,nickname,HEX_DIGEST_LEN) == 0);
|
(base16_decode(digest,DIGEST_LEN,nickname,HEX_DIGEST_LEN) == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user