aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-10-18 04:23:31 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-10-18 07:46:51 +0200
commitd3b67cba3c1767a50aad5e6c7f71b2986414ca32 (patch)
tree18d646d495a078bf38003cc77cc02eef3ec954cf
parentf3d000f49662f7b3d94340f30fd745c58712ea2b (diff)
downloadtor-d3b67cba3c1767a50aad5e6c7f71b2986414ca32.tar.gz
tor-d3b67cba3c1767a50aad5e6c7f71b2986414ca32.zip
Send relay_early cells in rend circs
There are no relay left that run version 0.2.1.3 through 0.2.1.18, so changing this behaviour should be safe now.
-rw-r--r--changes/relay_early_rend6
-rw-r--r--src/or/relay.c14
2 files changed, 10 insertions, 10 deletions
diff --git a/changes/relay_early_rend b/changes/relay_early_rend
new file mode 100644
index 0000000000..411a0f6408
--- /dev/null
+++ b/changes/relay_early_rend
@@ -0,0 +1,6 @@
+ o Code simplifications and refactorting:
+ - When we fixed bug 1038 we had to put in a restriction not to send
+ RELAY_EARLY cells for relay cells on rend circuits. This was necessary
+ as long as relays using Tor 0.2.1.3-alpha through 0.2.1.18-alpha were
+ active. Since this isn't the case anymore, we unify our behaviour here.
+ Implements bug 2081.
diff --git a/src/or/relay.c b/src/or/relay.c
index b12cef4912..467f8847c8 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -592,17 +592,11 @@ relay_send_command_from_edge(streamid_t stream_id, circuit_t *circ,
origin_circuit_t *origin_circ = TO_ORIGIN_CIRCUIT(circ);
if (origin_circ->remaining_relay_early_cells > 0 &&
(relay_command == RELAY_COMMAND_EXTEND ||
- (cpath_layer != origin_circ->cpath &&
- !CIRCUIT_PURPOSE_IS_ESTABLISHED_REND(circ->purpose)))) {
- /* If we've got any relay_early cells left, and we're sending
- * an extend cell or (we're not talking to the first hop and we're
- * not talking to a rendezvous circuit), use one of them.
- * Don't worry about the conn protocol version:
+ cpath_layer != origin_circ->cpath)) {
+ /* If we've got any relay_early cells left and (we're sending
+ * an extend cell or we're not talking to the first hop), use
+ * one of them. Don't worry about the conn protocol version:
* append_cell_to_circuit_queue will fix it up. */
- /* XXX For now, clients don't use RELAY_EARLY cells when sending
- * relay cells on rendezvous circuits. See bug 1038. Once no relays
- * (and thus no rendezvous points) are running 0.2.1.3-alpha through
- * 0.2.1.18, we can take out that exception. -RD */
cell.command = CELL_RELAY_EARLY;
--origin_circ->remaining_relay_early_cells;
log_debug(LD_OR, "Sending a RELAY_EARLY cell; %d remaining.",