diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-04-03 09:36:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-04-03 09:36:59 -0400 |
commit | b349f09b4763fb17bf77e3ed128996094d01ac84 (patch) | |
tree | bfee37e8baec8272394bd5e2dc21aef4e88fc548 /src/or/entrynodes.c | |
parent | a934376049fa1a55ca729731ac68da7978953447 (diff) | |
parent | 33b7083f26e30304f6c9296e3cb7205f6bda0c95 (diff) | |
download | tor-b349f09b4763fb17bf77e3ed128996094d01ac84.tar.gz tor-b349f09b4763fb17bf77e3ed128996094d01ac84.zip |
Merge remote-tracking branch 'origin/maint-0.2.4'
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r-- | src/or/entrynodes.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 48eb309ce0..086561a9c8 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -1215,6 +1215,21 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg) continue; } + if (use_cnt < success_cnt) { + int severity = LOG_INFO; + /* If this state file was written by a Tor that would have + * already fixed it, then the overcounting bug is still there.. */ + if (tor_version_as_new_as(state_version, "0.2.4.12-alpha")) { + severity = LOG_NOTICE; + } + log_fn(severity, LD_BUG, + "State file contains unexpectedly high usage success " + "counts %lf/%lf for Guard %s ($%s)", + success_cnt, use_cnt, + node->nickname, hex_str(node->identity, DIGEST_LEN)); + success_cnt = use_cnt; + } + node->use_attempts = use_cnt; node->use_successes = success_cnt; @@ -1265,6 +1280,21 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg) unusable = 0; } + if (hop_cnt < success_cnt) { + int severity = LOG_INFO; + /* If this state file was written by a Tor that would have + * already fixed it, then the overcounting bug is still there.. */ + if (tor_version_as_new_as(state_version, "0.2.4.12-alpha")) { + severity = LOG_NOTICE; + } + log_fn(severity, LD_BUG, + "State file contains unexpectedly high success counts " + "%lf/%lf for Guard %s ($%s)", + success_cnt, hop_cnt, + node->nickname, hex_str(node->identity, DIGEST_LEN)); + success_cnt = hop_cnt; + } + node->circ_attempts = hop_cnt; node->circ_successes = success_cnt; |