aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-11-27 08:21:59 -0500
committerNick Mathewson <nickm@torproject.org>2011-11-27 08:21:59 -0500
commit617617e21a2d30a86cea9c8f7043333078f2e8f8 (patch)
treef929b4d6429d33d636be49bfa20f54a3ef00598e
parent58d1aa44023e8b458450c4c00d5828f768c0adb5 (diff)
downloadtor-617617e21a2d30a86cea9c8f7043333078f2e8f8.tar
tor-617617e21a2d30a86cea9c8f7043333078f2e8f8.tar.gz
Don't schedule excess_renegotiations_callback unless it's set
Partial fix for bug 4587; reported by "frosty_un".
-rw-r--r--src/common/tortls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 0571b346d..e052c85eb 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1318,7 +1318,8 @@ tor_tls_got_client_hello(tor_tls_t *tls)
}
tls->got_renegotiate = 1;
- } else if (tls->server_handshake_count > 2) {
+ } else if (tls->server_handshake_count > 2 &&
+ tls->excess_renegotiations_callback) {
/* We got more than one renegotiation requests. The Tor protocol
needs just one renegotiation; more than that probably means
They are trying to DoS us and we have to stop them. We can't