[or-cvs] only whine about clock skew from the dirserver if he"s a tr...

Roger Dingledine arma at seul.org
Thu Apr 7 21:09: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:
only whine about clock skew from the dirserver if he's a trusted
dirserver.


Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -d -r1.222 -r1.223
--- directory.c	1 Apr 2005 20:15:55 -0000	1.222
+++ directory.c	7 Apr 2005 21:09:19 -0000	1.223
@@ -60,7 +60,7 @@
 char rend_fetch_url[] = "/tor/rendezvous/";
 #endif
 
-#define ALLOW_DIRECTORY_TIME_SKEW 30*60
+#define ALLOW_DIRECTORY_TIME_SKEW 30*60 /* 30 minutes */
 
 /********* END VARIABLES ************/
 
@@ -649,8 +649,7 @@
     now = time(NULL);
     delta = now-date_header;
     if (abs(delta)>ALLOW_DIRECTORY_TIME_SKEW) {
-      routerinfo_t *router = router_get_by_digest(conn->identity_digest);
-      log_fn((router && router->is_verified) ? LOG_WARN : LOG_INFO,
+      log_fn(router_digest_is_trusted_dir(conn->identity_digest) ? 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",



More information about the tor-commits mailing list