[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master] Do not invoke tls_renegotiated_cb for non-bufferevent connections too early.
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue, 30 Nov 2010 17:55:27 -0500
Subject: Do not invoke tls_renegotiated_cb for non-bufferevent connections too early.
Commit: 8fa4450fde435bcab5e050b3a9b2b34c072f40b9
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.
---
src/or/connection_or.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 0809934..a79c1e5 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);
--
1.7.1