Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16524 closed enhancement (fixed)

Don't vote HSDir if we aren't voting Valid

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-auth
Cc: phw, teor Actual Points:
Parent ID: #16538 Points:
Reviewer: Sponsor: SponsorR

Description

Similar to #15963 and #8243, if we end up taking away the Valid flag from a relay, I would like us to take away the HSDir flag too.

(I think there may still be some bug where if you take away the Valid flag, you end up taking away the Running flag soon after, accidentally. But I think that bug is different and orthogonal to this one.)

In particular, there are relays currently that are running malicious HSDirs, but I'd like the opportunity to still make use of them for other (less sensitive) positions.

Child Tickets

Change History (10)

comment:1 Changed 3 years ago by phw

Cc: phw added

comment:2 Changed 3 years ago by teor

Cc: teor added

comment:3 Changed 3 years ago by arma

Parent ID: #16538

comment:4 Changed 3 years ago by arma

Status: newneeds_information

Actually, check out router_is_active(). I think we may already be doing this.

comment:5 Changed 3 years ago by arma

Resolution: worksforme
Status: needs_informationclosed

Yes, I've checked this on moria1 and it looks like it's working as intended already. Grand.

(But see the first comment in #16558 for why withholding HSDir if we withhold Valid isn't exactly the thing that we want.)

comment:6 Changed 3 years ago by arma

Resolution: worksforme
Status: closedreopened

Reopening because #8712 actually broke things, causing this ticket to become a valid ticket.

comment:7 Changed 3 years ago by arma

I'm running this on moria1:

diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 0a15332..2f10114 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1372,7 +1372,8 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router
 
   return (router->wants_to_be_hs_dir && router->dir_port &&
           node->is_stable &&
-          uptime >= get_options()->MinUptimeHidServDirectoryV2);
+          uptime >= get_options()->MinUptimeHidServDirectoryV2 &&
+          router_is_active(router, node, now));
 }
 
 /** Don't consider routers with less bandwidth than this when computing

comment:8 Changed 3 years ago by arma

Status: reopenedneeds_review

comment:9 Changed 3 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged!

comment:10 Changed 3 years ago by dgoulet

Keywords: SponsorR removed
Sponsor: SponsorR
Note: See TracTickets for help on using tickets.