mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-22 22:25:51 +01:00
Be willing to cache directories from up to ROUTER_MAX_AGE seconds into the future, now that we are more tolerant of skew.
svn:r3832
This commit is contained in:
parent
631ab5c69b
commit
0b7a9e2e7b
1 changed files with 3 additions and 3 deletions
|
@ -751,10 +751,10 @@ void dirserv_set_cached_directory(const char *directory, time_t when,
|
|||
d = is_running_routers ? &cached_runningrouters : &cached_directory;
|
||||
if (when<=d->published) {
|
||||
log_fn(LOG_INFO, "Ignoring old directory; not caching.");
|
||||
} else if (when>=now+ROUTER_ALLOW_SKEW) {
|
||||
} else if (when>=now+ROUTER_MAX_AGE) {
|
||||
log_fn(LOG_INFO, "Ignoring future directory; not caching.");
|
||||
} else if (when>d->published &&
|
||||
when<now+ROUTER_ALLOW_SKEW) {
|
||||
} else {
|
||||
/* if (when>d->published && when<now+ROUTER_MAX_AGE) */
|
||||
log_fn(LOG_DEBUG, "Caching directory.");
|
||||
tor_free(d->dir);
|
||||
d->dir = tor_strdup(directory);
|
||||
|
|
Loading…
Add table
Reference in a new issue