Loading ChangeLog +3 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ Changes in version 0.2.1.1-alpha - 2008-??-?? - Add a malloc_good_size implementation to OpenBSD_malloc_linux.c, to avoid unused RAM in buffer chunks and memory pools. - Downgrade "sslv3 alert handshake failure" message to INFO. - Only log guard node status when guard node status has changed. - Downgrade the 3 most common "INFO" messages to "DEBUG". This will make "INFO" 75% less verbose. o Code simplifications and refactoring: - Refactor code using connection_ap_handshake_attach_circuit() to Loading src/or/circuitbuild.c +18 −12 Original line number Diff line number Diff line Loading @@ -755,7 +755,7 @@ circuit_extend(cell_t *cell, circuit_t *circ) char tmpbuf[INET_NTOA_BUF_LEN]; in.s_addr = htonl(circ->n_addr); tor_inet_ntoa(&in,tmpbuf,sizeof(tmpbuf)); log_info(LD_CIRC|LD_OR,"Next router (%s:%d) not connected. Connecting.", log_debug(LD_CIRC|LD_OR,"Next router (%s:%d) not connected. Connecting.", tmpbuf, circ->n_port); circ->n_conn_onionskin = tor_malloc(ONIONSKIN_CHALLENGE_LEN); Loading Loading @@ -2169,8 +2169,9 @@ entry_guards_compute_status(void) { time_t now; int changed = 0; int severity = LOG_INFO; int severity = LOG_DEBUG; or_options_t *options; const char **reasons; if (! entry_guards) return; Loading @@ -2178,6 +2179,7 @@ entry_guards_compute_status(void) now = time(NULL); reasons = tor_malloc_zero(smartlist_len(entry_guards) * sizeof(char*)); SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry, { routerinfo_t *r = router_get_by_digest(entry->identity); Loading @@ -2187,24 +2189,28 @@ entry_guards_compute_status(void) if (entry->bad_since) tor_assert(reason); log_info(LD_CIRC, "Summary: Entry '%s' is %s, %s%s, and %s.", entry->nickname, entry->unreachable_since ? "unreachable" : "reachable", entry->bad_since ? "unusable: " : "usable", entry->bad_since ? reason : "", entry_is_live(entry, 0, 1, 0) ? "live" : "not live"); reasons[entry_sl_idx] = reason; }); if (remove_dead_entry_guards()) changed = 1; severity = changed ? LOG_DEBUG : LOG_INFO; if (changed) { log_fn(severity, LD_CIRC, " (%d/%d entry guards are usable/new)", SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry, log_info(LD_CIRC, "Summary: Entry '%s' is %s, %s%s, and %s.", entry->nickname, entry->unreachable_since ? "unreachable" : "reachable", entry->bad_since ? "unusable: " : "usable", reasons[entry_sl_idx] ? reasons[entry_sl_idx] : "", entry_is_live(entry, 0, 1, 0) ? "live" : "not live")); log_info(LD_CIRC, " (%d/%d entry guards are usable/new)", num_live_entry_guards(), smartlist_len(entry_guards)); log_entry_guards(LOG_INFO); entry_guards_changed(); } tor_free(reasons); } /** Called when a connection to an OR with the identity digest <b>digest</b> Loading src/or/connection.c +2 −2 Original line number Diff line number Diff line Loading @@ -1965,14 +1965,14 @@ connection_read_to_buf(connection_t *conn, int *max_to_read) switch (result) { case TOR_TLS_CLOSE: case TOR_TLS_ERROR_IO: log_info(LD_NET,"TLS connection closed %son read. Closing. " log_debug(LD_NET,"TLS connection closed %son read. Closing. " "(Nickname %s, address %s", result == TOR_TLS_CLOSE ? "cleanly " : "", or_conn->nickname ? or_conn->nickname : "not set", conn->address); return result; CASE_TOR_TLS_ERROR_ANY_NONIO: log_info(LD_NET,"tls error [%s]. breaking (nickname %s, address %s).", log_debug(LD_NET,"tls error [%s]. breaking (nickname %s, address %s).", tor_tls_err_to_string(result), or_conn->nickname ? or_conn->nickname : "not set", conn->address); Loading src/or/directory.c +2 −2 Original line number Diff line number Diff line Loading @@ -2209,7 +2209,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, dlen = compressed ? d->dir_z_len : d->dir_len; if (global_write_bucket_low(TO_CONN(conn), dlen, 1)) { log_info(LD_DIRSERV, log_debug(LD_DIRSERV, "Client asked for the mirrored directory, but we've been " "writing too many bytes lately. Sending 503 Dir busy."); write_http_status_line(conn, 503, "Directory busy, try again later"); Loading Loading @@ -2314,7 +2314,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, dlen = dirserv_estimate_data_size(dir_fps, 0, compressed); if (global_write_bucket_low(TO_CONN(conn), dlen, 2)) { log_info(LD_DIRSERV, log_debug(LD_DIRSERV, "Client asked for network status lists, but we've been " "writing too many bytes lately. Sending 503 Dir busy."); write_http_status_line(conn, 503, "Directory busy, try again later"); Loading Loading
ChangeLog +3 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ Changes in version 0.2.1.1-alpha - 2008-??-?? - Add a malloc_good_size implementation to OpenBSD_malloc_linux.c, to avoid unused RAM in buffer chunks and memory pools. - Downgrade "sslv3 alert handshake failure" message to INFO. - Only log guard node status when guard node status has changed. - Downgrade the 3 most common "INFO" messages to "DEBUG". This will make "INFO" 75% less verbose. o Code simplifications and refactoring: - Refactor code using connection_ap_handshake_attach_circuit() to Loading
src/or/circuitbuild.c +18 −12 Original line number Diff line number Diff line Loading @@ -755,7 +755,7 @@ circuit_extend(cell_t *cell, circuit_t *circ) char tmpbuf[INET_NTOA_BUF_LEN]; in.s_addr = htonl(circ->n_addr); tor_inet_ntoa(&in,tmpbuf,sizeof(tmpbuf)); log_info(LD_CIRC|LD_OR,"Next router (%s:%d) not connected. Connecting.", log_debug(LD_CIRC|LD_OR,"Next router (%s:%d) not connected. Connecting.", tmpbuf, circ->n_port); circ->n_conn_onionskin = tor_malloc(ONIONSKIN_CHALLENGE_LEN); Loading Loading @@ -2169,8 +2169,9 @@ entry_guards_compute_status(void) { time_t now; int changed = 0; int severity = LOG_INFO; int severity = LOG_DEBUG; or_options_t *options; const char **reasons; if (! entry_guards) return; Loading @@ -2178,6 +2179,7 @@ entry_guards_compute_status(void) now = time(NULL); reasons = tor_malloc_zero(smartlist_len(entry_guards) * sizeof(char*)); SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry, { routerinfo_t *r = router_get_by_digest(entry->identity); Loading @@ -2187,24 +2189,28 @@ entry_guards_compute_status(void) if (entry->bad_since) tor_assert(reason); log_info(LD_CIRC, "Summary: Entry '%s' is %s, %s%s, and %s.", entry->nickname, entry->unreachable_since ? "unreachable" : "reachable", entry->bad_since ? "unusable: " : "usable", entry->bad_since ? reason : "", entry_is_live(entry, 0, 1, 0) ? "live" : "not live"); reasons[entry_sl_idx] = reason; }); if (remove_dead_entry_guards()) changed = 1; severity = changed ? LOG_DEBUG : LOG_INFO; if (changed) { log_fn(severity, LD_CIRC, " (%d/%d entry guards are usable/new)", SMARTLIST_FOREACH(entry_guards, entry_guard_t *, entry, log_info(LD_CIRC, "Summary: Entry '%s' is %s, %s%s, and %s.", entry->nickname, entry->unreachable_since ? "unreachable" : "reachable", entry->bad_since ? "unusable: " : "usable", reasons[entry_sl_idx] ? reasons[entry_sl_idx] : "", entry_is_live(entry, 0, 1, 0) ? "live" : "not live")); log_info(LD_CIRC, " (%d/%d entry guards are usable/new)", num_live_entry_guards(), smartlist_len(entry_guards)); log_entry_guards(LOG_INFO); entry_guards_changed(); } tor_free(reasons); } /** Called when a connection to an OR with the identity digest <b>digest</b> Loading
src/or/connection.c +2 −2 Original line number Diff line number Diff line Loading @@ -1965,14 +1965,14 @@ connection_read_to_buf(connection_t *conn, int *max_to_read) switch (result) { case TOR_TLS_CLOSE: case TOR_TLS_ERROR_IO: log_info(LD_NET,"TLS connection closed %son read. Closing. " log_debug(LD_NET,"TLS connection closed %son read. Closing. " "(Nickname %s, address %s", result == TOR_TLS_CLOSE ? "cleanly " : "", or_conn->nickname ? or_conn->nickname : "not set", conn->address); return result; CASE_TOR_TLS_ERROR_ANY_NONIO: log_info(LD_NET,"tls error [%s]. breaking (nickname %s, address %s).", log_debug(LD_NET,"tls error [%s]. breaking (nickname %s, address %s).", tor_tls_err_to_string(result), or_conn->nickname ? or_conn->nickname : "not set", conn->address); Loading
src/or/directory.c +2 −2 Original line number Diff line number Diff line Loading @@ -2209,7 +2209,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, dlen = compressed ? d->dir_z_len : d->dir_len; if (global_write_bucket_low(TO_CONN(conn), dlen, 1)) { log_info(LD_DIRSERV, log_debug(LD_DIRSERV, "Client asked for the mirrored directory, but we've been " "writing too many bytes lately. Sending 503 Dir busy."); write_http_status_line(conn, 503, "Directory busy, try again later"); Loading Loading @@ -2314,7 +2314,7 @@ directory_handle_command_get(dir_connection_t *conn, const char *headers, dlen = dirserv_estimate_data_size(dir_fps, 0, compressed); if (global_write_bucket_low(TO_CONN(conn), dlen, 2)) { log_info(LD_DIRSERV, log_debug(LD_DIRSERV, "Client asked for network status lists, but we've been " "writing too many bytes lately. Sending 503 Dir busy."); write_http_status_line(conn, 503, "Directory busy, try again later"); Loading