diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-01-09 15:27:32 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-01-09 15:27:32 -0500 |
commit | 93894fb770afbbea9850e850ff9e1bb23d7cc4e1 (patch) | |
tree | f06bb96a46f4602319b44af56fa31a82bf29fdd8 /src/feature/nodelist/routerlist.c | |
parent | e45810113b150533611c7d9cb5f0f264e00a7394 (diff) | |
parent | 686c5e90a31c6a47a6b3ef6946fc2019b2015c78 (diff) | |
download | tor-93894fb770afbbea9850e850ff9e1bb23d7cc4e1.tar.gz tor-93894fb770afbbea9850e850ff9e1bb23d7cc4e1.zip |
Merge branch 'ticket22029_attempt_squashed'
Diffstat (limited to 'src/feature/nodelist/routerlist.c')
-rw-r--r-- | src/feature/nodelist/routerlist.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c index e6457191bf..390d6c9c01 100644 --- a/src/feature/nodelist/routerlist.c +++ b/src/feature/nodelist/routerlist.c @@ -2558,8 +2558,15 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, map = digestmap_new(); list_pending_descriptor_downloads(map, 0); SMARTLIST_FOREACH_BEGIN(consensus->routerstatus_list, void *, rsp) { - routerstatus_t *rs = - is_vote ? &(((vote_routerstatus_t *)rsp)->status) : rsp; + routerstatus_t *rs; + vote_routerstatus_t *vrs; + if (is_vote) { + rs = &(((vote_routerstatus_t *)rsp)->status); + vrs = rsp; + } else { + rs = rsp; + vrs = NULL; + } signed_descriptor_t *sd; if ((sd = router_get_by_descriptor_digest(rs->descriptor_digest))) { const routerinfo_t *ri; @@ -2584,7 +2591,7 @@ update_consensus_router_descriptor_downloads(time_t now, int is_vote, ++n_delayed; /* Not ready for retry. */ continue; } - if (authdir && dirserv_would_reject_router(rs)) { + if (authdir && is_vote && dirserv_would_reject_router(rs, vrs)) { ++n_would_reject; continue; /* We would throw it out immediately. */ } |