소스 검색

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.
Nick Mathewson 15 년 전
부모
커밋
8fa4450fde
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/or/connection_or.c

+ 2 - 0
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);