Commit 0e8d1c22 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Merge remote branch 'hoganrobert/bug1859' into maint-0.2.2

parents ea7f4be6 69a496ba
Loading
Loading
Loading
Loading

changes/bug1859

0 → 100644
+9 −0
Original line number Diff line number Diff line
  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.
+1 −1
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ circuit_discard_optional_exit_enclaves(extend_info_t *info)
        !edge_conn->chosen_exit_retries)
      continue;
    r1 = router_get_by_nickname(edge_conn->chosen_exit_name, 0);
    r2 = router_get_by_nickname(info->nickname, 0);
    r2 = router_get_by_digest(info->identity_digest);
    if (!r1 || !r2 || r1 != r2)
      continue;
    tor_assert(edge_conn->socks_request);
+1 −1
Original line number Diff line number Diff line
@@ -755,7 +755,7 @@ rend_client_get_random_intro(const rend_data_t *rend_query)
  intro = smartlist_get(entry->parsed->intro_nodes, i);
  /* Do we need to look up the router or is the extend info complete? */
  if (!intro->extend_info->onion_key) {
    router = router_get_by_nickname(intro->extend_info->nickname, 0);
    router = router_get_by_digest(intro->extend_info->identity_digest);
    if (!router) {
      log_info(LD_REND, "Unknown router with nickname '%s'; trying another.",
               intro->extend_info->nickname);
+0 −3
Original line number Diff line number Diff line
@@ -2273,9 +2273,6 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed)
    return router_get_by_hexdigest(nickname);
  if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME))
    return NULL;
  if (server_mode(get_options()) &&
      !strcasecmp(nickname, get_options()->Nickname))
    return router_get_my_routerinfo();

  maybedigest = (strlen(nickname) >= HEX_DIGEST_LEN) &&
    (base16_decode(digest,DIGEST_LEN,nickname,HEX_DIGEST_LEN) == 0);