be quieter about hidserv descriptors that are too old or too new.

we can't do anything about them anyway.


svn:r6073
This commit is contained in:
Roger Dingledine
2006-02-21 06:23:57 +00:00
parent 6a7d2bf94e
commit 25ed4b66e3
2 changed files with 7 additions and 5 deletions
+3 -2
View File
@@ -1722,8 +1722,9 @@ directory_handle_command_post(connection_t *conn, char *headers,
/* rendezvous descriptor post */
if (rend_cache_store(body, body_len) < 0) {
// char tmp[1024*2+1];
log_notice(LD_DIRSERV,"Rejected rend descriptor (length %d) from %s.",
(int)body_len, origin);
log_fn(LOG_PROTOCOL_WARN, LD_DIRSERV,
"Rejected rend descriptor (length %d) from %s.",
(int)body_len, origin);
#if 0
if (body_len <= 1024) {
base16_encode(tmp, sizeof(tmp), body, body_len);
+4 -3
View File
@@ -379,13 +379,14 @@ rend_cache_store(const char *desc, size_t desc_len)
tor_snprintf(key, sizeof(key), "%c%s", parsed->version?'1':'0', query);
now = time(NULL);
if (parsed->timestamp < now-REND_CACHE_MAX_AGE-REND_CACHE_MAX_SKEW) {
log_warn(LD_REND,"Service descriptor %s is too old.", safe_str(query));
log_fn(LOG_PROTOCOL_WARN, LD_REND,
"Service descriptor %s is too old.", safe_str(query));
rend_service_descriptor_free(parsed);
return -1;
}
if (parsed->timestamp > now+REND_CACHE_MAX_SKEW) {
log_warn(LD_REND,"Service descriptor %s is too far in the future.",
safe_str(query));
log_fn(LOG_PROTOCOL_WARN, LD_REND,
"Service descriptor %s is too far in the future.", safe_str(query));
rend_service_descriptor_free(parsed);
return -1;
}