]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix handling of ntor handshakes received via CREATE cells
authorNick Mathewson <nickm@torproject.org>
Tue, 15 Jan 2013 05:41:09 +0000 (00:41 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 15 Jan 2013 05:41:09 +0000 (00:41 -0500)
Fixes bug 7959; bugfix on 0.2.4.8-alpha.

changes/bug7959 [new file with mode: 0644]
src/or/onion.c

diff --git a/changes/bug7959 b/changes/bug7959
new file mode 100644 (file)
index 0000000..80cd866
--- /dev/null
@@ -0,0 +1,6 @@
+  o Major bugfixes:
+    - Fix backward compatibility logic when receiving an embedded ntor
+      handshake tunneled in a CREATE cell. This clears up the "Bug: couldn't
+      format CREATED cell" warning. Fix for bug 7959; bugfix on
+      0.2.4.8-alpha.
+
index fc3e621f7332cf1e61bc905bff404065e1f3e117..329b01c20e23416c6158e54f3c0c3333c22d59b8 100644 (file)
@@ -560,7 +560,8 @@ check_created_cell(const created_cell_t *cell)
 {
   switch (cell->cell_type) {
   case CELL_CREATED:
-    if (cell->handshake_len != TAP_ONIONSKIN_REPLY_LEN)
+    if (cell->handshake_len != TAP_ONIONSKIN_REPLY_LEN &&
+        cell->handshake_len != NTOR_REPLY_LEN)
       return -1;
     break;
   case CELL_CREATED_FAST: