]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Correctly close intro circuit when deleting ephemeral HS
authorDavid Goulet <dgoulet@torproject.org>
Thu, 16 Jun 2016 16:58:30 +0000 (12:58 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Thu, 16 Jun 2016 17:09:24 +0000 (13:09 -0400)
When deleting an ephemeral HS, we were only iterating on circuit with an
OPEN state. However, it could be possible that an intro point circuit didn't
reached the open state yet.

This commit makes it that we close the circuit regardless of its state
except if it was already marked for close.

Fixes #18604

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/bug18604 [new file with mode: 0644]
src/or/rendservice.c

diff --git a/changes/bug18604 b/changes/bug18604
new file mode 100644 (file)
index 0000000..114c67e
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (ephemeral hidden service)
+    - When deleting an ephemeral hidden service, close its intro points even
+      if not in the open state. Resolves ticket #18604; bugfix on
+      tor-0.2.7.1-alpha.
index 7426d8b35de2cc8c1324346d9f8659ce7a5fd946..ff2305030073ed14f11ffedcb3395ab6e5df627f 100644 (file)
@@ -926,7 +926,6 @@ rend_service_del_ephemeral(const char *service_id)
    */
   SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, circ) {
     if (!circ->marked_for_close &&
-        circ->state == CIRCUIT_STATE_OPEN &&
         (circ->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO ||
          circ->purpose == CIRCUIT_PURPOSE_S_INTRO)) {
       origin_circuit_t *oc = TO_ORIGIN_CIRCUIT(circ);