Don't use any OR connection which sent us a CREATE_FAST cell for an EXTEND

Fix suggested by Nick Mathewson.
This commit is contained in:
Robert Ransom
2011-10-23 14:27:56 -07:00
committed by Sebastian Hahn
parent 638fdedcf1
commit af12c39d6d
4 changed files with 24 additions and 0 deletions
+6
View File
@@ -285,7 +285,13 @@ command_process_create_cell(cell_t *cell, or_connection_t *conn)
* a CPU worker. */
char keys[CPATH_KEY_MATERIAL_LEN];
char reply[DIGEST_LEN*2];
tor_assert(cell->command == CELL_CREATE_FAST);
/* Make sure we never try to use the OR connection on which we
* received this cell to satisfy an EXTEND request, */
conn->is_connection_with_client = 1;
if (fast_server_handshake(cell->payload, (uint8_t*)reply,
(uint8_t*)keys, sizeof(keys))<0) {
log_warn(LD_OR,"Failed to generate key material. Closing.");