diff options
author | teor <teor@torproject.org> | 2018-11-21 19:51:34 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2018-11-22 16:54:34 +1000 |
commit | 657618ba9bd96830b0a283c28db203bf9fffb15d (patch) | |
tree | b3bf85d5dfbe75f50ba0dda3dbab9db0564c0faa /src/feature/nodelist/microdesc.c | |
parent | d1ac5613fc832f4b298fbc243a35660dbd0976e3 (diff) | |
download | tor-657618ba9bd96830b0a283c28db203bf9fffb15d.tar.gz tor-657618ba9bd96830b0a283c28db203bf9fffb15d.zip |
Entry Nodes: Mark outdated dirservers in reasonably live consensuses
Fixes bug 28569; bugfix on Tor 0.3.2.5-alpha.
Diffstat (limited to 'src/feature/nodelist/microdesc.c')
-rw-r--r-- | src/feature/nodelist/microdesc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/feature/nodelist/microdesc.c b/src/feature/nodelist/microdesc.c index 146c772daf..3f5085412f 100644 --- a/src/feature/nodelist/microdesc.c +++ b/src/feature/nodelist/microdesc.c @@ -108,10 +108,12 @@ microdesc_note_outdated_dirserver(const char *relay_digest) { char relay_hexdigest[HEX_DIGEST_LEN+1]; - /* Don't register outdated dirservers if we don't have a live consensus, - * since we might be trying to fetch microdescriptors that are not even - * currently active. */ - if (!networkstatus_get_live_consensus(approx_time())) { + /* If we have a reasonably live consensus, then most of our dirservers should + * still be caching all the microdescriptors in it. Reasonably live + * consensuses are up to a day old. But microdescriptors expire 7 days after + * the last consensus that referenced them. */ + if (!networkstatus_get_reasonably_live_consensus(approx_time(), + FLAV_MICRODESC)) { return; } |