[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r17972: {tor} backport r17970 (in tor/branches/tor-0_2_0-patches: . src/or)
Author: arma
Date: 2009-01-06 14:07:30 -0500 (Tue, 06 Jan 2009)
New Revision: 17972
Modified:
tor/branches/tor-0_2_0-patches/ChangeLog
tor/branches/tor-0_2_0-patches/src/or/cpuworker.c
Log:
backport r17970
Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog 2009-01-06 19:07:21 UTC (rev 17971)
+++ tor/branches/tor-0_2_0-patches/ChangeLog 2009-01-06 19:07:30 UTC (rev 17972)
@@ -70,6 +70,9 @@
- 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
Modified: tor/branches/tor-0_2_0-patches/src/or/cpuworker.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/cpuworker.c 2009-01-06 19:07:21 UTC (rev 17971)
+++ tor/branches/tor-0_2_0-patches/src/or/cpuworker.c 2009-01-06 19:07:30 UTC (rev 17972)
@@ -276,7 +276,10 @@
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.");