]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs: Don't enter the HS v3 subsystem without a live consensus
authorDavid Goulet <dgoulet@torproject.org>
Fri, 25 Aug 2017 18:03:15 +0000 (14:03 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 5 Sep 2017 12:24:22 +0000 (08:24 -0400)
The service needs the latest SRV and set of relays for the best accurate
hashring to upload its descriptor to so it needs a live consensus thus don't
do anything until we have it.

Fixes #23331

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/or/main.c

index 5d51d1deadc75a753db9a0e1d1e3d99fc71eb5fe..d57ef521c6db9573f85b52a9b9c9e09ae55ebb66 100644 (file)
@@ -2110,7 +2110,8 @@ hs_service_callback(time_t now, const or_options_t *options)
 
   /* We need to at least be able to build circuits and that we actually have
    * a working network. */
-  if (!have_completed_a_circuit() || net_is_disabled()) {
+  if (!have_completed_a_circuit() || net_is_disabled() ||
+      networkstatus_get_live_consensus(now) == NULL) {
     goto end;
   }