mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Treat the StaleDesc flag as making our descriptor dirty.
Relay side of prop293.
This commit is contained in:
parent
36f808c936
commit
881b85cf32
1 changed files with 6 additions and 1 deletions
|
@ -59,6 +59,7 @@
|
|||
#include "feature/dircommon/dir_connection_st.h"
|
||||
#include "feature/nodelist/authority_cert_st.h"
|
||||
#include "feature/nodelist/extrainfo_st.h"
|
||||
#include "feature/nodelist/networkstatus_st.h"
|
||||
#include "feature/nodelist/node_st.h"
|
||||
#include "feature/nodelist/routerinfo_st.h"
|
||||
#include "feature/nodelist/routerstatus_st.h"
|
||||
|
@ -2134,7 +2135,9 @@ mark_my_descriptor_dirty_if_too_old(time_t now)
|
|||
/* Now we see whether we want to be retrying frequently or no. The
|
||||
* rule here is that we'll retry frequently if we aren't listed in the
|
||||
* live consensus we have, or if the publication time of the
|
||||
* descriptor listed for us in the consensus is very old. */
|
||||
* descriptor listed for us in the consensus is very old, or if the
|
||||
* consensus lists us as "stale" and we haven't regenerated since the
|
||||
* consensus was published. */
|
||||
ns = networkstatus_get_live_consensus(now);
|
||||
if (ns) {
|
||||
rs = networkstatus_vote_find_entry(ns, server_identitykey_digest);
|
||||
|
@ -2142,6 +2145,8 @@ mark_my_descriptor_dirty_if_too_old(time_t now)
|
|||
retry_fast_reason = "not listed in consensus";
|
||||
else if (rs->published_on < slow_cutoff)
|
||||
retry_fast_reason = "version listed in consensus is quite old";
|
||||
else if (rs->is_staledesc && ns->valid_after > desc_clean_since)
|
||||
retry_fast_reason = "listed as stale in consensus";
|
||||
}
|
||||
|
||||
if (retry_fast_reason && desc_clean_since < fast_cutoff)
|
||||
|
|
Loading…
Add table
Reference in a new issue