[or-cvs] if we get an incredibly skewed timestamp from a dirserver m...

Roger Dingledine arma at seul.org
Fri Jan 21 00:45:21 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	directory.c 
Log Message:
if we get an incredibly skewed timestamp from a dirserver mirror that
isn't a verified OR, don't complain very loudly -- it's probably him
that's wrong.


Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- directory.c	20 Jan 2005 20:18:32 -0000	1.199
+++ directory.c	21 Jan 2005 00:45:18 -0000	1.200
@@ -613,7 +613,9 @@
     now = time(NULL);
     delta = now-date_header;
     if (abs(delta)>ALLOW_DIRECTORY_TIME_SKEW) {
-      log_fn(LOG_WARN, "Received directory with skewed time (server '%s'): we are %d minutes %s, or the directory is %d minutes %s.",
+      routerinfo_t *router = router_get_by_digest(conn->identity_digest);
+      log_fn((router && router->is_verified) ? LOG_WARN : LOG_INFO,
+             "Received directory with skewed time (server '%s'): we are %d minutes %s, or the directory is %d minutes %s.",
              conn->address,
              abs(delta)/60, delta>0 ? "ahead" : "behind",
              abs(delta)/60, delta>0 ? "behind" : "ahead");



More information about the tor-commits mailing list