aboutsummaryrefslogtreecommitdiff
path: root/src/or/entrynodes.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2012-10-24 18:03:09 -0700
committerMike Perry <mikeperry-git@fscked.org>2012-12-07 15:28:37 -0800
commit248fbc3619664e1d9f4b16732ccbdb484939624d (patch)
treea1f026afd2c3c3ca7c92ffa3308494061ff00b3c /src/or/entrynodes.c
parent954f263ed5eb451a0742f8888681e10e64dd193a (diff)
downloadtor-248fbc3619664e1d9f4b16732ccbdb484939624d.tar
tor-248fbc3619664e1d9f4b16732ccbdb484939624d.tar.gz
Update pathbias parameters to match Proposal 209.
Needs manpage update and testing still..
Diffstat (limited to 'src/or/entrynodes.c')
-rw-r--r--src/or/entrynodes.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index d9a06a657..faf5269a5 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -1048,8 +1048,9 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg)
/* Note: We rely on the < comparison here to allow us to set a 0
* rate and disable the feature entirely. If refactoring, don't
* change to <= */
- if (node->circuit_successes/((double)node->first_hops)
- < pathbias_get_disable_rate(options)) {
+ if ((node->circuit_successes/((double)node->first_hops)
+ < pathbias_get_crit_rate(options)) &&
+ pathbias_get_dropguards(options)) {
node->path_bias_disabled = 1;
log_info(LD_GENERAL,
"Path bias is too high (%u/%u); disabling node %s",