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
This commit is contained in:
Nick Mathewson
2008-12-17 13:14:40 +00:00
parent a750683d2f
commit fea3382aca
3 changed files with 12 additions and 2 deletions
+3
View File
@@ -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
+4 -2
View File
@@ -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.
+5
View File
@@ -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. */