mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
Downgrade some xxx021s, comment more on others, etc
svn:r17823
This commit is contained in:
parent
8625297cee
commit
3a8a2cb2de
4 changed files with 11 additions and 17 deletions
|
@ -812,13 +812,10 @@ circuit_build_failed(origin_circuit_t *circ)
|
||||||
} else if (circ->_base.state == CIRCUIT_STATE_OR_WAIT &&
|
} else if (circ->_base.state == CIRCUIT_STATE_OR_WAIT &&
|
||||||
circ->_base.n_hop) {
|
circ->_base.n_hop) {
|
||||||
n_conn_id = circ->_base.n_hop->identity_digest;
|
n_conn_id = circ->_base.n_hop->identity_digest;
|
||||||
#if 0
|
/* Do not set n_conn. If we're in state_or_wait, it's wrong to blame a
|
||||||
/* XXXX021 I believe this logic was wrong. If we're in state_or_wait,
|
* particular connection for our failure to extend and set its
|
||||||
* it's wrong to blame a particular connection for our failure to extend
|
* is_bad_for_new_circs field, since no connection ever got a chance to
|
||||||
* and set its is_bad_for_new_circs field: no connection ever got
|
* hear our CREATE cell. */
|
||||||
* a chance to hear our CREATE cell. -NM*/
|
|
||||||
n_conn = connection_or_get_by_identity_digest(n_conn_id);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (n_conn) {
|
if (n_conn) {
|
||||||
log_info(LD_OR,
|
log_info(LD_OR,
|
||||||
|
@ -1089,7 +1086,7 @@ circuit_get_open_circ_or_launch(edge_connection_t *conn,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
routerinfo_t *router = router_get_by_nickname(conn->chosen_exit_name, 1);
|
||||||
int opt = conn->chosen_exit_optional;
|
int opt = conn->chosen_exit_optional;
|
||||||
if (router && !connection_ap_can_use_exit(conn, router)) {
|
if (router && !connection_ap_can_use_exit(conn, router)) {
|
||||||
|
|
|
@ -688,7 +688,7 @@ static int parse_dir_server_line(const char *line,
|
||||||
static int validate_data_directory(or_options_t *options);
|
static int validate_data_directory(or_options_t *options);
|
||||||
static int write_configuration_file(const char *fname, 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,
|
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);
|
int escape_val);
|
||||||
static void config_init(config_format_t *fmt, void *options);
|
static void config_init(config_format_t *fmt, void *options);
|
||||||
static int or_state_validate(or_state_t *old_options, or_state_t *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
|
* 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. */
|
* escape that value. Return NULL if no such key exists. */
|
||||||
static config_line_t *
|
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)
|
const char *key, int escape_val)
|
||||||
/* XXXX argument is options, but fmt is provided. Inconsistent. */
|
|
||||||
{
|
{
|
||||||
config_var_t *var;
|
config_var_t *var;
|
||||||
const void *value;
|
const void *value;
|
||||||
|
@ -2464,7 +2463,7 @@ is_local_addr(const tor_addr_t *addr)
|
||||||
if (get_options()->EnforceDistinctSubnets == 0)
|
if (get_options()->EnforceDistinctSubnets == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (tor_addr_family(addr) == AF_INET) {
|
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);
|
uint32_t ip = tor_addr_to_ipv4h(addr);
|
||||||
|
|
||||||
/* It's possible that this next check will hit before the first time
|
/* It's possible that this next check will hit before the first time
|
||||||
|
|
|
@ -582,8 +582,6 @@ connection_about_to_close_connection(connection_t *conn)
|
||||||
int reason = tls_error_to_orconn_end_reason(or_conn->tls_error);
|
int reason = tls_error_to_orconn_end_reason(or_conn->tls_error);
|
||||||
control_event_or_conn_status(or_conn, OR_CONN_EVENT_FAILED,
|
control_event_or_conn_status(or_conn, OR_CONN_EVENT_FAILED,
|
||||||
reason);
|
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))
|
if (!authdir_mode_tests_reachability(options))
|
||||||
control_event_bootstrap_problem(
|
control_event_bootstrap_problem(
|
||||||
orconn_end_reason_to_control_string(reason), reason);
|
orconn_end_reason_to_control_string(reason), reason);
|
||||||
|
|
|
@ -967,8 +967,8 @@ typedef struct connection_t {
|
||||||
/** Unique identifier for this connection on this Tor instance. */
|
/** Unique identifier for this connection on this Tor instance. */
|
||||||
uint64_t global_identifier;
|
uint64_t global_identifier;
|
||||||
|
|
||||||
/* XXXX021 move this field into a subtype, or (hack, spit) make it a union
|
/* XXXX022 move this field, and all the listener-only fields (just
|
||||||
* with some other fields. */
|
socket_family, I think), into a new listener_connection_t subtype. */
|
||||||
/** If the connection is a CONN_TYPE_AP_DNS_LISTENER, this field points
|
/** 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. */
|
* to the evdns_server_port is uses to listen to and answer connections. */
|
||||||
struct evdns_server_port *dns_server_port;
|
struct evdns_server_port *dns_server_port;
|
||||||
|
|
Loading…
Add table
Reference in a new issue