aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-11 12:52:21 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-11 12:52:21 -0400
commit0888c2f8f55037b49fead49091013f2cc7de17c5 (patch)
tree7834a9e5a8362e65d66265b81c970271fe28a0d7 /src/or/circuitbuild.c
parente0655708a20069a5f42476a25d62e9d3f8138d8c (diff)
downloadtor-0888c2f8f55037b49fead49091013f2cc7de17c5.tar.gz
tor-0888c2f8f55037b49fead49091013f2cc7de17c5.zip
When no usable exit satisfies a predicted port, stop predicting it.
Fix for bug 3296.
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 5481838ccb..3b82ed7455 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2847,6 +2847,10 @@ choose_good_exit_server_general(int need_uptime, int need_capacity)
if (node)
break;
smartlist_clear(supporting);
+ /* If we reach this point, we can't actually support any unhandled
+ * predicted ports, so clear all the remaining ones. */
+ if (smartlist_len(needed_ports))
+ rep_hist_remove_predicted_ports(needed_ports);
}
SMARTLIST_FOREACH(needed_ports, uint16_t *, cp, tor_free(cp));
smartlist_free(needed_ports);