summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-11-30 17:55:27 -0500
committerNick Mathewson <nickm@torproject.org>2010-11-30 17:55:27 -0500
commit8fa4450fde435bcab5e050b3a9b2b34c072f40b9 (patch)
treee8930e7abe5ba69700478344936a9ebcdf4678ad /src/or
parent9f51e26715c488a9a4c9a92f42bea09a9f61100c (diff)
downloadtor-8fa4450fde435bcab5e050b3a9b2b34c072f40b9.tar.gz
tor-8fa4450fde435bcab5e050b3a9b2b34c072f40b9.zip
Do not invoke tls_renegotiated_cb for non-bufferevent connections too early.
This is not the most beautiful fix for this problem, but it is the simplest. Bugfix for 2205. Thanks to Sebastian and Mashael for finding the bug, and boboper/cypherpunks for figuring out why it was happening and how to fix it, and for writing a few fixes.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection_or.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 0809934cea..a79c1e5079 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -240,12 +240,14 @@ connection_or_process_inbuf(or_connection_t *conn)
}
return ret;
+#ifdef USE_BUFFEREVENTS
case OR_CONN_STATE_TLS_SERVER_RENEGOTIATING:
if (tor_tls_server_got_renegotiate(conn->tls))
connection_or_tls_renegotiated_cb(conn->tls, conn);
if (conn->_base.marked_for_close)
return 0;
/* fall through. */
+#endif
case OR_CONN_STATE_OPEN:
case OR_CONN_STATE_OR_HANDSHAKING:
return connection_or_process_cells_from_inbuf(conn);