diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-25 10:05:13 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-25 10:05:13 -0500 |
commit | 36f808c9364bb2e6781e555697eac977d754e905 (patch) | |
tree | e95fc5c5093b1391bd0ca179ffdee492497b385a /src/feature/dirauth/voteflags.c | |
parent | 3741f9e524a2d3bd7239ca865d6169fd1e3dddb5 (diff) | |
download | tor-36f808c9364bb2e6781e555697eac977d754e905.tar.gz tor-36f808c9364bb2e6781e555697eac977d754e905.zip |
Vote on the StaleDesc flag from prop293
The StaleDesc flag tells relays that they need to upload a new
descriptor soon, or they will drop out of the consensus.
Diffstat (limited to 'src/feature/dirauth/voteflags.c')
-rw-r--r-- | src/feature/dirauth/voteflags.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/dirauth/voteflags.c b/src/feature/dirauth/voteflags.c index 4a24dcb50d..5adf21ad11 100644 --- a/src/feature/dirauth/voteflags.c +++ b/src/feature/dirauth/voteflags.c @@ -593,6 +593,10 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs, rs->or_port = ri->or_port; rs->dir_port = ri->dir_port; rs->is_v2_dir = ri->supports_tunnelled_dir_requests; + + rs->is_staledesc = + (ri->cache_info.published_on + DESC_IS_STALE_INTERVAL) < now; + if (options->AuthDirHasIPv6Connectivity == 1 && !tor_addr_is_null(&ri->ipv6_addr) && node->last_reachable6 >= now - REACHABLE_TIMEOUT) { |