summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-01-06 19:07:30 +0000
committerRoger Dingledine <arma@torproject.org>2009-01-06 19:07:30 +0000
commit751b2682676d5bab4d4bf6ddeb7d0b26cf37cf53 (patch)
treeb2d93586f6216ed1dcc254db57801646bf1c81ef
parent59e380c559819ae9d481fe460ccae3f9f9e5d1c8 (diff)
downloadtor-751b2682676d5bab4d4bf6ddeb7d0b26cf37cf53.tar.gz
tor-751b2682676d5bab4d4bf6ddeb7d0b26cf37cf53.zip
backport r17970
svn:r17972
-rw-r--r--ChangeLog3
-rw-r--r--src/or/cpuworker.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ee2dcc74b6..7224c7a5ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,9 @@ Changes in version 0.2.0.33 - 2009-01-??
- If a broken client asks a non-exit router to connect somewhere,
do not even do the DNS lookup before rejecting the connection.
Fixes another case of bug 619. Patch from rovv.
+ - When a relay gets a create cell it can't decrypt (e.g. because it's
+ using the wrong onion key), we were dropping it and letting the
+ client time out. Now actually answer with a destroy cell. Fixes bug 904. Bugfix on 0.0.2pre8.
o Minor bugfixes (hidden services):
- Do not throw away existing introduction points on SIGHUP. Bugfix on
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 5b1866549d..4b9eab0dfa 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -276,7 +276,10 @@ cpuworker_main(void *data)
reply_to_proxy, keys, CPATH_KEY_MATERIAL_LEN) < 0) {
/* failure */
log_debug(LD_OR,"onion_skin_server_handshake failed.");
- memset(buf,0,LEN_ONION_RESPONSE); /* send all zeros for failure */
+ *buf = 0; /* indicate failure in first byte */
+ memcpy(buf+1,tag,TAG_LEN);
+ /* send all zeros as answer */
+ memset(buf+1+TAG_LEN, 0, LEN_ONION_RESPONSE-(1+TAG_LEN));
} else {
/* success */
log_debug(LD_OR,"onion_skin_server_handshake succeeded.");