]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Simplify hidden service descriptor creation
authorteor <teor2345@gmail.com>
Thu, 2 Mar 2017 04:55:33 +0000 (15:55 +1100)
committerNick Mathewson <nickm@torproject.org>
Sun, 5 Mar 2017 04:15:55 +0000 (23:15 -0500)
Use an existing flag to check if an introduction point is established.

Cleanup after 21596.

Fixes bug 21599; bugfix on 0.2.7.2-alpha.

changes/bug21599 [new file with mode: 0644]
src/or/rendservice.c

diff --git a/changes/bug21599 b/changes/bug21599
new file mode 100644 (file)
index 0000000..fe0f21a
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (hidden services):
+    - Simplify hidden service descriptor creation by using an existing flag
+      to check if an introduction point is established.
+      Fixes bug 21599; bugfix on 0.2.7.2-alpha.
index c23d45cf34b2d4f544d6b8188198f5729cc0b1d0..51558990d804c1d351c2fddb8fed21edd7721eaf 100644 (file)
@@ -1035,7 +1035,6 @@ static void
 rend_service_update_descriptor(rend_service_t *service)
 {
   rend_service_descriptor_t *d;
-  origin_circuit_t *circ;
   int i;
 
   rend_service_descriptor_free(service->desc);
@@ -1056,9 +1055,10 @@ rend_service_update_descriptor(rend_service_t *service)
     /* This intro point won't be listed in the descriptor... */
     intro_svc->listed_in_last_desc = 0;
 
-    circ = find_intro_circuit(intro_svc, service->pk_digest);
-    if (!circ || circ->base_.purpose != CIRCUIT_PURPOSE_S_INTRO) {
-      /* This intro point's circuit isn't finished yet.  Don't list it. */
+    /* circuit_established is set in rend_service_intro_established(), and
+     * checked every second in rend_consider_services_intro_points(), so it's
+     * safe to use it here */
+    if (!intro_svc->circuit_established) {
       continue;
     }