aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2013-09-05 02:34:58 -0400
committerRoger Dingledine <arma@torproject.org>2013-09-05 02:34:58 -0400
commit86907ea4db5067d1fbf56275457a919d6789ba95 (patch)
treed37c00248b7e9a1f1c9194604a85a4bcf2a90fd4 /src/or/onion.c
parent6156887adfa724805f90b3b7cf2be6213f08a450 (diff)
parent2c877d2da4a989639311de11e4ada8dd03bc8187 (diff)
downloadtor-86907ea4db5067d1fbf56275457a919d6789ba95.tar
tor-86907ea4db5067d1fbf56275457a919d6789ba95.tar.gz
Merge branch 'maint-0.2.4'
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index 3a202c8c7..3e1d63d4e 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -226,7 +226,8 @@ decide_next_handshake_type(void)
* got here first. In any case this edge case will only become relevant
* once tap is rare. We should reevaluate whether we like this decision
* once tap gets more rare. */
- if (ol_entries[ONION_HANDSHAKE_TYPE_NTOR])
+ if (ol_entries[ONION_HANDSHAKE_TYPE_NTOR] &&
+ recently_chosen_ntors <= num_ntors_per_tap())
++recently_chosen_ntors;
return ONION_HANDSHAKE_TYPE_NTOR; /* no taps? try ntor */