summaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-01-31 12:31:43 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-31 12:31:43 -0500
commit746d959100f0275e3ad4442e89901796f669413e (patch)
treea38157b8df08bef124337e8919699c04428ae336 /src/or/nodelist.c
parent02da24f8e5b2ce34da941cc25ce9808b447065ac (diff)
downloadtor-746d959100f0275e3ad4442e89901796f669413e.tar.gz
tor-746d959100f0275e3ad4442e89901796f669413e.zip
Don't build circuits till primary guards have descriptors
In addition to not wanting to build circuits until we can see most of the paths in the network, and in addition to not wanting to build circuits until we have a consensus ... we shouldn't build circuits till all of our (in-use) primary guards have descriptors that we can use for them. This is another bug 21242 fix.
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 804af297ba..96e95baf5a 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -43,6 +43,7 @@
#include "config.h"
#include "control.h"
#include "dirserv.h"
+#include "entrynodes.h"
#include "geoip.h"
#include "main.h"
#include "microdesc.h"
@@ -1991,6 +1992,13 @@ update_router_have_minimum_dir_info(void)
using_md = consensus->flavor == FLAV_MICRODESC;
+ if (! entry_guards_have_enough_dir_info_to_build_circuits()) {
+ strlcpy(dir_info_status, "We're missing descriptors for some of our "
+ "primary entry guards", sizeof(dir_info_status));
+ res = 0;
+ goto done;
+ }
+
/* Check fraction of available paths */
{
char *status = NULL;