summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-12 17:00:40 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-12 17:00:40 +0000
commitafd0f2d13b711b37849e5d0fcf862b520acd778c (patch)
tree538560729df3f71a301c5c44b7e938ef36198131
parentd52051da48f8a1fadd2debf2bccfb7770f694eef (diff)
downloadtor-afd0f2d13b711b37849e5d0fcf862b520acd778c.tar.gz
tor-afd0f2d13b711b37849e5d0fcf862b520acd778c.zip
r13736@catbus: nickm | 2007-07-12 12:54:33 -0400
Backport r10493: weight guard selection by bandwidth svn:r10815
-rw-r--r--ChangeLog2
-rw-r--r--doc/TODO.0124
-rw-r--r--src/or/routerlist.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 941dbfef92..3ea0d0efd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,8 @@ Changes in version 0.1.2.15 - 2007-0?-??
Resolves bug 444.
o Minor bugfixes (misc)
+ - Weight guard selection by bandwidth, so that high-bandwidth nodes
+ don't get underused as guards.
- On Windows, we were preventing other processes from reading
cached-routers while Tor was running. (Reported by janbar)
- Fix a possible (but very unlikely) bug in picking routers by bandwidth.
diff --git a/doc/TODO.012 b/doc/TODO.012
index eb6828cef0..d31af0fe98 100644
--- a/doc/TODO.012
+++ b/doc/TODO.012
@@ -6,9 +6,9 @@ Backport items for 0.1.2:
o r10376, r10396: Fix segfaults in directory code
o r10478: stop tearing down entire circuits because the user asked for
a nonexistent hidden service port
- - r10493: weight guard selection by bandwidth (??)
+ o r10493: weight guard selection by bandwidth
o r10495: change an assert into a tor_assert
- - r10521: fix an impossible (?) memory leak (??)
+ - r10521: fix an impossible^Wapparently real memory leak
o r10524: make the LICENSE and AUTHORS files mention Tor.
o r10563: use correct types with desc_digest_map.
o r10566: build correctly on systems where size_t is bigger than ulong.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 4d6ed26ccb..940371ef80 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1163,7 +1163,7 @@ router_choose_random_node(const char *preferred,
if (excludedsmartlist)
smartlist_subtract(sl,excludedsmartlist);
- if (need_capacity)
+ if (need_capacity || need_guard)
choice = routerlist_sl_choose_by_bandwidth(sl, weight_for_exit);
else
choice = smartlist_choose(sl);