]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Patch from lark: if we get two extend cells for the same circuit id, drop the second...
authorNick Mathewson <nickm@torproject.org>
Sat, 21 Feb 2009 19:07:05 +0000 (19:07 +0000)
committerNick Mathewson <nickm@torproject.org>
Sat, 21 Feb 2009 19:07:05 +0000 (19:07 +0000)
svn:r18668

ChangeLog
src/or/circuitbuild.c

index 31a87219b32de4a7a3439c9a383bc49569fdaa8f..fa2037c4cd11df9a05a57a4e1163124c5e78085a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,8 @@ Changes in version 0.2.1.13-????? - 2009-02-??
       seconds. Bugfix on 0.1.2.7-alpha; reported by Mike Perry.
     - Drop begin cells to a hidden service if they come from the middle of a
       circuit.  Patch from lark.
+    - When we erroneously receive two EXTEND cells for the same circuit ID
+      on the same connection, drop the second.  Patch from lark.
 
   o Minor features:
     - On Linux, use the prctl call to re-enable core dumps when the user
index 12db9dd7c5325170fadfcb5776e6f37cdc34b68f..42da9e6fe0aec8ed3fa9f419a35fcb4e6d28746a 100644 (file)
@@ -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,