aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_cache.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-28 12:14:10 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-28 12:14:10 -0500
commitc36c6b50575cc0db94e6e770f5b4d437c851ff59 (patch)
treef5b74ff508ed401ef086e159a47703663d86b2a3 /src/feature/hs/hs_cache.c
parent0b49cacd6354063b94338058ff6b1ab52b03f3f1 (diff)
parentdd5fbc1bd9d54d191240ac4e15b5324fb83a903d (diff)
downloadtor-c36c6b50575cc0db94e6e770f5b4d437c851ff59.tar.gz
tor-c36c6b50575cc0db94e6e770f5b4d437c851ff59.zip
Merge branch 'maint-0.4.3' into release-0.4.3
Diffstat (limited to 'src/feature/hs/hs_cache.c')
-rw-r--r--src/feature/hs/hs_cache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c
index 44cd2505fd..ef5e88e947 100644
--- a/src/feature/hs/hs_cache.c
+++ b/src/feature/hs/hs_cache.c
@@ -17,6 +17,7 @@
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_client.h"
#include "feature/hs/hs_descriptor.h"
+#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/rend/rendcache.h"
@@ -739,7 +740,9 @@ cached_client_descriptor_has_expired(time_t now,
/* We use the current consensus time to see if we should expire this
* descriptor since we use consensus time for all other parts of the protocol
* as well (e.g. to build the blinded key and compute time periods). */
- const networkstatus_t *ns = networkstatus_get_live_consensus(now);
+ const networkstatus_t *ns =
+ networkstatus_get_reasonably_live_consensus(now,
+ usable_consensus_flavor());
/* If we don't have a recent consensus, consider this entry expired since we
* will want to fetch a new HS desc when we get a live consensus. */
if (!ns) {