diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/rendcommon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index ffe5093ad3..29028f4f70 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -156,8 +156,8 @@ int rend_get_service_id(crypto_pk_env_t *pk, char *out) /* ==== Rendezvous service descriptor cache. */ -#define REND_CACHE_MAX_AGE (24*60*60) -#define REND_CACHE_MAX_SKEW (90*60) +#define REND_CACHE_MAX_AGE (48*60*60) +#define REND_CACHE_MAX_SKEW (24*60*60) /** Map from service id (as generated by rend_get_service_id) to * rend_cache_entry_t. */ @@ -195,7 +195,7 @@ void rend_cache_clean(void) void *val; rend_cache_entry_t *ent; time_t cutoff; - cutoff = time(NULL) - REND_CACHE_MAX_AGE; + cutoff = time(NULL) - REND_CACHE_MAX_AGE - REND_CACHE_MAX_SKEW; for (iter = strmap_iter_init(rend_cache); !strmap_iter_done(iter); ) { strmap_iter_get(iter, &key, &val); ent = (rend_cache_entry_t*)val; @@ -279,7 +279,7 @@ int rend_cache_store(const char *desc, size_t desc_len) return -1; } now = time(NULL); - if (parsed->timestamp < now-REND_CACHE_MAX_AGE) { + if (parsed->timestamp < now-REND_CACHE_MAX_AGE-REND_CACHE_MAX_SKEW) { log_fn(LOG_WARN,"Service descriptor %s is too old", query); rend_service_descriptor_free(parsed); return -1; |