diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-10-23 14:27:56 -0700 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-26 23:20:56 +0200 |
commit | af12c39d6de5bbcd24915db3c4cc9404f102ac02 (patch) | |
tree | d54e82419530e0248367fdba1547a7b7d0e0dec9 /src/or/command.c | |
parent | 638fdedcf16cf7d6f7c586d36f7ef335c1c9714f (diff) | |
download | tor-af12c39d6de5bbcd24915db3c4cc9404f102ac02.tar.gz tor-af12c39d6de5bbcd24915db3c4cc9404f102ac02.zip |
Don't use any OR connection which sent us a CREATE_FAST cell for an EXTEND
Fix suggested by Nick Mathewson.
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/command.c b/src/or/command.c index 61b898cead..a17a3a6025 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -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."); |