aboutsummaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-06 11:12:28 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2017-09-08 19:07:00 +0300
commit4d38731e93e927374044fde2730149cb07ac0766 (patch)
tree2b29a13ddf60b76774a0f0b176e6fc1066747f71 /src/or/nodelist.c
parentcd07af60c9e73e16034870ee1d03f729c1f2dd98 (diff)
downloadtor-4d38731e93e927374044fde2730149cb07ac0766.tar.gz
tor-4d38731e93e927374044fde2730149cb07ac0766.zip
prop224: Make client and service pick same HSDir
With the latest change on how we use the HSDir index, the client and service need to pick their responsible HSDir differently that is depending on if they are before or after a new time period. The overlap mode is active function has been renamed for this and test added. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index b8baee54f1..2dadfe54a8 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -208,8 +208,7 @@ node_set_hsdir_index(node_t *node, const networkstatus_t *ns)
/* We always use the current time period for fetching descs */
fetch_tp = current_time_period_num;
- /* Now extract the needed SRVs and time periods for building hsdir indices */
- if (!hs_overlap_mode_is_active(ns, now)) {
+ if (hs_time_between_tp_and_srv(ns, now)) {
fetch_srv = hs_get_current_srv(fetch_tp, ns);
store_first_tp = hs_get_previous_time_period_num(0);