Commit 3a8a2cb2 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

Downgrade some xxx021s, comment more on others, etc

svn:r17823
parent 8625297c
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -812,13 +812,10 @@ circuit_build_failed(origin_circuit_t *circ)
    } else if (circ->_base.state == CIRCUIT_STATE_OR_WAIT &&
               circ->_base.n_hop) {
      n_conn_id = circ->_base.n_hop->identity_digest;
#if 0
      /* XXXX021 I believe this logic was wrong.  If we're in state_or_wait,
       * it's wrong to blame a particular connection for our failure to extend
       * and set its is_bad_for_new_circs field: no connection ever got
       * a chance to hear our CREATE cell. -NM*/
      n_conn = connection_or_get_by_identity_digest(n_conn_id);
#endif
      /* Do not set n_conn.  If we're in state_or_wait, it's wrong to blame a
       * particular connection for our failure to extend and set its
       * is_bad_for_new_circs field, since no connection ever got a chance to
       * hear our CREATE cell. */
    }
    if (n_conn) {
      log_info(LD_OR,
@@ -1089,7 +1086,7 @@ circuit_get_open_circ_or_launch(edge_connection_t *conn,
        return -1;
      }
    } else {
      /* XXXX021 Duplicates checks in connection_ap_handshake_attach_circuit */
      /* XXXX022 Duplicates checks in connection_ap_handshake_attach_circuit */
      routerinfo_t *router = router_get_by_nickname(conn->chosen_exit_name, 1);
      int opt = conn->chosen_exit_optional;
      if (router && !connection_ap_can_use_exit(conn, router)) {
+4 −5
Original line number Diff line number Diff line
@@ -688,7 +688,7 @@ static int parse_dir_server_line(const char *line,
static int validate_data_directory(or_options_t *options);
static int write_configuration_file(const char *fname, or_options_t *options);
static config_line_t *get_assigned_option(config_format_t *fmt,
                                      or_options_t *options, const char *key,
                                          void *options, const char *key,
                                          int escape_val);
static void config_init(config_format_t *fmt, void *options);
static int or_state_validate(or_state_t *old_options, or_state_t *options,
@@ -1929,9 +1929,8 @@ config_lines_dup(const config_line_t *inp)
 * value needs to be quoted before it's put in a config file, quote and
 * escape that value. Return NULL if no such key exists. */
static config_line_t *
get_assigned_option(config_format_t *fmt, or_options_t *options,
get_assigned_option(config_format_t *fmt, void *options,
                    const char *key, int escape_val)
/* XXXX argument is options, but fmt is provided. Inconsistent. */
{
  config_var_t *var;
  const void *value;
@@ -2464,7 +2463,7 @@ is_local_addr(const tor_addr_t *addr)
  if (get_options()->EnforceDistinctSubnets == 0)
    return 0;
  if (tor_addr_family(addr) == AF_INET) {
    /*XXXX021 IP6 what corresponds to an /24? */
    /*XXXX022 IP6 what corresponds to an /24? */
    uint32_t ip = tor_addr_to_ipv4h(addr);

    /* It's possible that this next check will hit before the first time
+0 −2
Original line number Diff line number Diff line
@@ -582,8 +582,6 @@ connection_about_to_close_connection(connection_t *conn)
            int reason = tls_error_to_orconn_end_reason(or_conn->tls_error);
            control_event_or_conn_status(or_conn, OR_CONN_EVENT_FAILED,
                                         reason);
            /* XXX021 come up with a better string for the first arg -RD */
            /* What did you have in mind? -NM */
            if (!authdir_mode_tests_reachability(options))
              control_event_bootstrap_problem(
                orconn_end_reason_to_control_string(reason), reason);
+2 −2
Original line number Diff line number Diff line
@@ -967,8 +967,8 @@ typedef struct connection_t {
  /** Unique identifier for this connection on this Tor instance. */
  uint64_t global_identifier;

  /* XXXX021 move this field into a subtype, or (hack, spit) make it a union
   * with some other fields. */
  /* XXXX022 move this field, and all the listener-only fields (just
     socket_family, I think), into a new listener_connection_t subtype. */
  /** If the connection is a CONN_TYPE_AP_DNS_LISTENER, this field points
   * to the evdns_server_port is uses to listen to and answer connections. */
  struct evdns_server_port *dns_server_port;