summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-27 15:55:32 +0200
committerNick Mathewson <nickm@torproject.org>2017-03-27 15:55:32 +0200
commit0c0f8ad061812f06c8379ebdb95fd71440fd4eed (patch)
treed64c6f4ce0715f2b44259c6807ffcf91e6819efd
parente1718c2dc09666f4db65b64964ef14580e45a5a8 (diff)
parentef4c10fb42e796a7a1662b5f1db27d10347e89af (diff)
downloadtor-0c0f8ad061812f06c8379ebdb95fd71440fd4eed.tar.gz
tor-0c0f8ad061812f06c8379ebdb95fd71440fd4eed.zip
Merge branch 'maint-0.3.0' into release-0.3.0
-rw-r--r--changes/bug217715
-rw-r--r--src/or/entrynodes.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/changes/bug21771 b/changes/bug21771
new file mode 100644
index 0000000000..f814c75c0b
--- /dev/null
+++ b/changes/bug21771
@@ -0,0 +1,5 @@
+ o Minor bugfixes (guard selection):
+ - Fix a guard selection bug where Tor would refuse to bootstrap in some
+ cases if the user swapped a bridge for another bridge in their
+ configuration file.
+ Fixes bug 21771; bugfix on 0.3.0.1-alpha. Reported by "torvlnt33r".
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index c3c576c812..e0a3854b74 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -989,9 +989,11 @@ get_max_sample_size(guard_selection_t *gs,
const int using_bridges = (gs->type == GS_TYPE_BRIDGE);
const int min_sample = get_min_filtered_sample_size();
- /* With bridges, max_sample is "all of them" */
+ /* If we are in bridge mode, expand our sample set as needed without worrying
+ * about max size. We should respect the user's wishes to use many bridges if
+ * that's what they have specified in their configuration file. */
if (using_bridges)
- return n_guards;
+ return INT_MAX;
const int max_sample_by_pct = (int)(n_guards * get_max_sample_threshold());
const int max_sample_absolute = get_max_sample_size_absolute();