aboutsummaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-10-23 14:27:56 -0700
committerSebastian Hahn <sebastian@torproject.org>2011-10-26 23:20:56 +0200
commitaf12c39d6de5bbcd24915db3c4cc9404f102ac02 (patch)
treed54e82419530e0248367fdba1547a7b7d0e0dec9 /src/or/command.c
parent638fdedcf16cf7d6f7c586d36f7ef335c1c9714f (diff)
downloadtor-af12c39d6de5bbcd24915db3c4cc9404f102ac02.tar
tor-af12c39d6de5bbcd24915db3c4cc9404f102ac02.tar.gz
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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/command.c b/src/or/command.c
index 61b898cea..a17a3a602 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.");