summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-02-21 19:07:05 +0000
committerNick Mathewson <nickm@torproject.org>2009-02-21 19:07:05 +0000
commit261670b57e8d8e44c6cba8a33c3ed1dfd4a519b5 (patch)
tree783f2b9063e5775aa678a6ade4e244287dc17eae /src/or
parent192b701fac38bc84c7fc0826f2c43beab30d63d2 (diff)
downloadtor-261670b57e8d8e44c6cba8a33c3ed1dfd4a519b5.tar.gz
tor-261670b57e8d8e44c6cba8a33c3ed1dfd4a519b5.zip
Patch from lark: if we get two extend cells for the same circuit id, drop the second. Previously, we had leaked an extend_info if the target connection was not open when the second arrived.
svn:r18668
Diffstat (limited to 'src/or')
-rw-r--r--src/or/circuitbuild.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 12db9dd7c5..42da9e6fe0 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -735,6 +735,11 @@ circuit_extend(cell_t *cell, circuit_t *circ)
"n_conn already set. Bug/attack. Closing.");
return -1;
}
+ if (circ->n_hop) {
+ log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
+ "conn to next hop already launched. Bug/attack. Closing.");
+ return -1;
+ }
if (!server_mode(get_options())) {
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,