aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2012-08-21 18:37:08 -0700
committerMike Perry <mikeperry-git@fscked.org>2012-08-23 20:28:25 -0700
commit4950618b135073f23f250520b01a80dd36e5a43f (patch)
tree0f64e0b37c413ae26b083a411a1b1a0cd0bea84e /src/or
parent880c71304b6592fccd812315d8c27d234b694221 (diff)
downloadtor-4950618b135073f23f250520b01a80dd36e5a43f.tar
tor-4950618b135073f23f250520b01a80dd36e5a43f.tar.gz
Bug 6475: Demote pathbias log messages for 0.2.3.x
Also make a couple of them less scary. We'll do a separate, additional commit on 0.2.4.x to bump them back up again.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/circuitbuild.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 35a32d864..8ad6d1744 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2657,7 +2657,7 @@ pathbias_count_first_hop(origin_circuit_t *circ)
if (circ->has_opened && circ->path_state != PATH_STATE_DID_FIRST_HOP) {
if ((rate_msg = rate_limit_log(&first_hop_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"Opened circuit is in strange path state %s. "
"Circuit is a %s currently %s. %s",
pathbias_state_to_string(circ->path_state),
@@ -2684,7 +2684,7 @@ pathbias_count_first_hop(origin_circuit_t *circ)
} else {
if ((rate_msg = rate_limit_log(&first_hop_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"Unopened circuit has strange path state %s. "
"Circuit is a %s currently %s. %s",
pathbias_state_to_string(circ->path_state),
@@ -2696,7 +2696,7 @@ pathbias_count_first_hop(origin_circuit_t *circ)
} else {
if ((rate_msg = rate_limit_log(&first_hop_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"Unopened circuit has no known guard. "
"Circuit is a %s currently %s. %s",
circuit_purpose_to_string(circ->_base.purpose),
@@ -2710,7 +2710,7 @@ pathbias_count_first_hop(origin_circuit_t *circ)
if (circ->path_state == PATH_STATE_NEW_CIRC) {
if ((rate_msg = rate_limit_log(&first_hop_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"A %s circuit is in cpath state %d (opened: %d). "
"Circuit is a %s currently %s. %s",
pathbias_state_to_string(circ->path_state),
@@ -2770,7 +2770,7 @@ pathbias_count_success(origin_circuit_t *circ)
} else {
if ((rate_msg = rate_limit_log(&success_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"Succeeded circuit is in strange path state %s. "
"Circuit is a %s currently %s. %s",
pathbias_state_to_string(circ->path_state),
@@ -2781,7 +2781,7 @@ pathbias_count_success(origin_circuit_t *circ)
}
if (guard->first_hops < guard->circuit_successes) {
- log_warn(LD_BUG, "Unexpectedly high circuit_successes (%u/%u) "
+ log_notice(LD_BUG, "Unexpectedly high circuit_successes (%u/%u) "
"for guard %s=%s",
guard->circuit_successes, guard->first_hops,
guard->nickname, hex_str(guard->identity, DIGEST_LEN));
@@ -2792,7 +2792,7 @@ pathbias_count_success(origin_circuit_t *circ)
} else if (circ->_base.purpose != CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT) {
if ((rate_msg = rate_limit_log(&success_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"Completed circuit has no known guard. "
"Circuit is a %s currently %s. %s",
circuit_purpose_to_string(circ->_base.purpose),
@@ -2804,7 +2804,7 @@ pathbias_count_success(origin_circuit_t *circ)
if (circ->path_state != PATH_STATE_SUCCEEDED) {
if ((rate_msg = rate_limit_log(&success_notice_limit,
approx_time()))) {
- log_notice(LD_BUG,
+ log_info(LD_BUG,
"Opened circuit is in strange path state %s. "
"Circuit is a %s currently %s. %s",
pathbias_state_to_string(circ->path_state),
@@ -2834,9 +2834,11 @@ entry_guard_inc_first_hop_count(entry_guard_t *guard)
if (guard->circuit_successes/((double)guard->first_hops)
< pathbias_get_disable_rate(options)) {
+ /* This message is currently disabled by default. */
log_warn(LD_PROTOCOL,
"Extremely low circuit success rate %u/%u for guard %s=%s. "
- "This might indicate an attack, or a bug.",
+ "This indicates either an overloaded guard, an attack, or "
+ "a bug.",
guard->circuit_successes, guard->first_hops, guard->nickname,
hex_str(guard->identity, DIGEST_LEN));
@@ -2857,6 +2859,11 @@ entry_guard_inc_first_hop_count(entry_guard_t *guard)
/* If we get a ton of circuits, just scale everything down */
if (guard->first_hops > (unsigned)pathbias_get_scale_threshold(options)) {
const int scale_factor = pathbias_get_scale_factor(options);
+ log_info(LD_PROTOCOL,
+ "Scaling pathbias counts to (%u/%u)/%d for guard %s=%s",
+ guard->circuit_successes, guard->first_hops,
+ scale_factor, guard->nickname, hex_str(guard->identity,
+ DIGEST_LEN));
guard->first_hops /= scale_factor;
guard->circuit_successes /= scale_factor;
}