summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_cache.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2021-01-12 18:05:32 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2021-01-12 18:05:32 +0200
commit42e95c8d852615a3e0470a5d81215fc11d9ebcec (patch)
treedde7e11dadfd3754d23d167b5670b83e00572782 /src/feature/hs/hs_cache.c
parent9c268b66ba72203aa2fc7e5c58b35cc883712886 (diff)
parent9b59ede8d342a11d7949a4793b7d456de2a3ff5d (diff)
downloadtor-42e95c8d852615a3e0470a5d81215fc11d9ebcec.tar.gz
tor-42e95c8d852615a3e0470a5d81215fc11d9ebcec.zip
Merge branch 'maint-0.4.5'
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 0febcfb40e..765323df0d 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"
#include "feature/stats/rephist.h"
@@ -743,7 +744,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) {