aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-06-18 07:34:04 +0000
committerRoger Dingledine <arma@torproject.org>2008-06-18 07:34:04 +0000
commitc6a94718cd92b53bc647b7a7fa2d2327138303a5 (patch)
tree83173d8173a40aec9252b840a4bd4abe4b3a7207 /src
parent50d3adb81938137b91b1f6720dfe84339e7309ce (diff)
downloadtor-c6a94718cd92b53bc647b7a7fa2d2327138303a5.tar
tor-c6a94718cd92b53bc647b7a7fa2d2327138303a5.tar.gz
Directory authorities shouldn't complain about bootstrapping
problems just because they do a lot of reachability testing and some of the connection attempts fail. svn:r15348
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c15
-rw-r--r--src/or/connection_or.c8
2 files changed, 14 insertions, 9 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 8cfea46ea..f83ea9d7f 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -495,23 +495,26 @@ connection_about_to_close_connection(connection_t *conn)
/* Remember why we're closing this connection. */
if (conn->state != OR_CONN_STATE_OPEN) {
if (connection_or_nonopen_was_started_here(or_conn)) {
+ or_options_t *options = get_options();
rep_hist_note_connect_failed(or_conn->identity_digest, now);
entry_guard_register_connect_status(or_conn->identity_digest,0,now);
- if (!get_options()->HttpsProxy)
+ if (!options->HttpsProxy)
router_set_status(or_conn->identity_digest, 0);
if (conn->state == OR_CONN_STATE_CONNECTING) {
control_event_or_conn_status(or_conn, OR_CONN_EVENT_FAILED,
errno_to_orconn_end_reason(or_conn->socket_error));
- control_event_bootstrap_problem(
- tor_socket_strerror(or_conn->socket_error),
- errno_to_orconn_end_reason(or_conn->socket_error));
+ if (!authdir_mode_tests_reachability(options))
+ control_event_bootstrap_problem(
+ tor_socket_strerror(or_conn->socket_error),
+ errno_to_orconn_end_reason(or_conn->socket_error));
} else {
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 */
- control_event_bootstrap_problem(
- orconn_end_reason_to_control_string(reason), reason);
+ if (!authdir_mode_tests_reachability(options))
+ control_event_bootstrap_problem(
+ orconn_end_reason_to_control_string(reason), reason);
}
}
/* Inform any pending (not attached) circs that they should
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 1081a4643..b9bc5f40a 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -548,8 +548,9 @@ connection_or_connect(uint32_t addr, uint16_t port, const char *id_digest)
}
control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED,
errno_to_orconn_end_reason(socket_error));
- control_event_bootstrap_problem(tor_socket_strerror(socket_error),
- errno_to_orconn_end_reason(socket_error));
+ if (!authdir_mode_tests_reachability(options))
+ control_event_bootstrap_problem(tor_socket_strerror(socket_error),
+ errno_to_orconn_end_reason(socket_error));
connection_free(TO_CONN(conn));
return NULL;
case 0:
@@ -799,7 +800,8 @@ connection_or_check_valid_tls_handshake(or_connection_t *conn,
router_set_status(conn->identity_digest, 0);
control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED,
END_OR_CONN_REASON_OR_IDENTITY);
- control_event_bootstrap_problem("foo", END_OR_CONN_REASON_OR_IDENTITY);
+ if (!authdir_mode_tests_reachability(options))
+ control_event_bootstrap_problem("foo", END_OR_CONN_REASON_OR_IDENTITY);
as_advertised = 0;
}
if (authdir_mode_tests_reachability(options)) {