summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-04 23:16:29 -0500
committerNick Mathewson <nickm@torproject.org>2017-03-04 23:16:29 -0500
commit958ec0f5f877b84d8519102cc0b5b55583a15144 (patch)
tree282e55b8125a46c02fc7c387fbdacb11db3eebe0
parentfe17955661551f869ea2777297bc44e08d01ec92 (diff)
parent684778e705b0e873e61a4befc4f1017db795cc66 (diff)
downloadtor-958ec0f5f877b84d8519102cc0b5b55583a15144.tar.gz
tor-958ec0f5f877b84d8519102cc0b5b55583a15144.zip
Merge branch 'bug21599_squashed'
-rw-r--r--changes/bug215994
-rw-r--r--src/or/rendservice.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/changes/bug21599 b/changes/bug21599
new file mode 100644
index 0000000000..fe0f21a740
--- /dev/null
+++ b/changes/bug21599
@@ -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.
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index c23d45cf34..51558990d8 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -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;
}