From f15cd22bb7c8f4f7009417e50a827c5bcc656807 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 20 Nov 2014 11:51:36 -0500 Subject: Don't build introduction circuits until we know we can build circuits Patch from akwizgran. Ticket 13447. --- src/or/config.c | 2 ++ src/or/rendservice.c | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/or/config.c b/src/or/config.c index dc2fc13b9a..5b62c565b9 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1071,6 +1071,8 @@ options_act_reversible(const or_options_t *old_options, char **msg) "non-control network connections. Shutting down all existing " "connections."); connection_mark_all_noncontrol_connections(); + /* We can't complete circuits until the network is re-enabled. */ + can_complete_circuit = 0; } } diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 3fed540e84..353c671550 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -16,6 +16,7 @@ #include "circuituse.h" #include "config.h" #include "directory.h" +#include "main.h" #include "networkstatus.h" #include "nodelist.h" #include "rendclient.h" @@ -3074,6 +3075,9 @@ rend_services_introduce(void) * an intro point to. */ smartlist_t *exclude_nodes = smartlist_new(); + if (!can_complete_circuit) + return; + now = time(NULL); for (i=0; i < smartlist_len(rend_service_list); ++i) { -- cgit v1.2.3-54-g00ecf