summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-02-21 19:07:01 +0000
committerNick Mathewson <nickm@torproject.org>2009-02-21 19:07:01 +0000
commit192b701fac38bc84c7fc0826f2c43beab30d63d2 (patch)
tree976bb8daf8e1280b0a8b9635a2c4213df73e73dd /src/or/relay.c
parent1b6688786cf008e8ae03684136efa43e0f915e92 (diff)
downloadtor-192b701fac38bc84c7fc0826f2c43beab30d63d2.tar.gz
tor-192b701fac38bc84c7fc0826f2c43beab30d63d2.zip
Patch from lark: drop BEGIN cells from a rendevous circuit if they do not originate from the end of the circuit.
svn:r18667
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 0c607f04f7..a6a8fef707 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1019,6 +1019,13 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
"Relay begin request unsupported at AP. Dropping.");
return 0;
}
+ if (circ->purpose == CIRCUIT_PURPOSE_S_REND_JOINED &&
+ layer_hint != TO_ORIGIN_CIRCUIT(circ)->cpath->prev) {
+ log_fn(LOG_PROTOCOL_WARN, LD_APP,
+ "Relay begin request to Hidden Service "
+ "from intermediary node. Dropping.");
+ return 0;
+ }
if (conn) {
log_fn(LOG_PROTOCOL_WARN, domain,
"Begin cell for known stream. Dropping.");