]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Bug 4786 fix: don't convert EARLY to RELAY on v1 connections
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Dec 2011 21:41:25 +0000 (16:41 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 28 Dec 2011 20:54:06 +0000 (15:54 -0500)
We used to do this as a workaround for older Tors, but now it's never
the correct thing to do (especially since anything that didn't
understand RELAY_EARLY is now deprecated hard).

changes/bug4786 [new file with mode: 0644]
src/or/relay.c

diff --git a/changes/bug4786 b/changes/bug4786
new file mode 100644 (file)
index 0000000..7c1c60f
--- /dev/null
@@ -0,0 +1,9 @@
+  - Feature removal:
+    - When sending or relaying a RELAY_EARLY cell, we used to convert
+      it to a RELAY cell if the connection was using the v1 link
+      protocol. This was a workaround for older versions of Tor, which
+      didn't handle RELAY_EARLY cells properly. Now that all supported
+      versions can handle RELAY_EARLY cells, and now that we're
+      enforcing the "no RELAY_EXTEND commands except in RELAY_EARLY
+      cells" rule, we're removing this workaround. Addresses bug 4786.
+
index 59e2c5c969b77aafcbb3e5e66172efba7c169def..272deb1f74d1589eb177ff6c485226ae55db8fc8 100644 (file)
@@ -1858,10 +1858,6 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn,
     queue = &orcirc->p_conn_cells;
     streams_blocked = circ->streams_blocked_on_p_conn;
   }
-  if (cell->command == CELL_RELAY_EARLY && orconn->link_proto < 2) {
-    /* V1 connections don't understand RELAY_EARLY. */
-    cell->command = CELL_RELAY;
-  }
 
   cell_queue_append_packed_copy(queue, cell);