From 1bce70a9e3b33d02b2bae4b94a1774db38d19d3a Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Thu, 28 Mar 2013 09:42:49 +0100 Subject: [PATCH 1/2] Make PathsNeededToBuildCircuits option work. --- src/or/config.c | 2 +- src/or/nodelist.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index a238a1ae70..ffa984bcda 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -2485,7 +2485,7 @@ options_validate(or_options_t *old_options, or_options_t *options, log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too low. Increasing " "to 0.25"); options->PathsNeededToBuildCircuits = 0.25; - } else if (options->PathsNeededToBuildCircuits < 0.95) { + } else if (options->PathsNeededToBuildCircuits > 0.95) { log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too high. Decreasing " "to 0.95"); options->PathsNeededToBuildCircuits = 0.95; diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 5f3b843d02..178f084b69 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -1418,7 +1418,7 @@ get_frac_paths_needed_for_circs(const or_options_t *options, const networkstatus_t *ns) { #define DFLT_PCT_USABLE_NEEDED 60 - if (options->PathsNeededToBuildCircuits >= 1.0) { + if (options->PathsNeededToBuildCircuits >= 0.0) { return options->PathsNeededToBuildCircuits; } else { return networkstatus_get_param(ns, "min_paths_for_circs_pct", From 96c0a42a926abec333327c3e9668a5721bab9afc Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 28 Mar 2013 09:33:24 -0400 Subject: [PATCH 2/2] Add a changes file for #8599 --- changes/bug8599 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changes/bug8599 diff --git a/changes/bug8599 b/changes/bug8599 new file mode 100644 index 0000000000..204ef58c3f --- /dev/null +++ b/changes/bug8599 @@ -0,0 +1,4 @@ + o Minor bugfixes: + - Fix some logic errors when the user manually overrides the + PathsNeededToBuildCircuits option in torrc. Fixes bug 8599; bugfix + on 0.2.4.10-alpha.