diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-17 13:14:40 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-17 13:14:40 +0000 |
commit | fea3382aca569cd93cc0a43b45e558e58cee6b8e (patch) | |
tree | ad30ee391f5a597f0f033bf03fd41bf6d6ce5695 | |
parent | a750683d2f3d35716a072dd7b0ba6c1d79a2119a (diff) | |
download | tor-fea3382aca569cd93cc0a43b45e558e58cee6b8e.tar.gz tor-fea3382aca569cd93cc0a43b45e558e58cee6b8e.zip |
Backport r17091: when we have no pending streams, choose exits with choose_good_exit_server_general rather than with circuit_get_unhandled_ports().
svn:r17637
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/TODO.020 | 6 | ||||
-rw-r--r-- | src/or/circuitbuild.c | 5 |
3 files changed, 12 insertions, 2 deletions
@@ -31,6 +31,9 @@ Changes in version 0.2.0.33 - 200?-??-?? until one succeeds. Fixes bug 691. - Use 64 bits instead of 32 bits for connection identifiers used with the controller protocol, to greatly reduce risk of identifier reuse. + - When we're choosing an exit node for a circuit, and we have no pending + streams, choose a good general exit rather than one that supports "all + the pending streams". Bugfix on 0.1.1.x. (Fix by rovv.) o Minor features: - Report the case where all signatures in a detached set are rejected diff --git a/doc/TODO.020 b/doc/TODO.020 index bc0855f22f..2d4d3b2298 100644 --- a/doc/TODO.020 +++ b/doc/TODO.020 @@ -12,8 +12,10 @@ Backport for 0.2.0 once better tested: approach). (Also maybe r16674) [Partially backported. Instead of the basic name checking, I backported r17171 instead, to be even more resistant to poisoning.] - - r17091: distinguish "no routers support pending circuits" from - "no circuits are pending." See also r17181 and r17184. + o r17091: distinguish "no routers support pending circuits" from + "no circuits are pending." + - See also r17181... + - ... and r17184. - r17137: send END cell in response to connect to nonexistent hidserv port. - r17138: reject *:* servers should never do DNS lookups. - r17139: Fix another case of overriding .exit choices. diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 606eab908f..473b67875a 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1255,6 +1255,11 @@ choose_good_exit_server_general(routerlist_t *dir, int need_uptime, // router->nickname, i); } }); /* End looping over connections. */ + if (n_pending_connections > 0 && n_supported[i] == 0) { + /* Leave best_support at -1 if that's where it is, so we can + * distinguish it later. */ + continue; + } if (n_supported[i] > best_support) { /* If this router is better than previous ones, remember its index * and goodness, and start counting how many routers are this good. */ |