[or-cvs] Be willing to cache directories from up to ROUTER_MAX_AGE s...

Nick Mathewson nickm at seul.org
Wed Mar 23 06:39:56 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv402/src/or

Modified Files:
	dirserv.c 
Log Message:
Be willing to cache directories from up to ROUTER_MAX_AGE seconds into the future, now that we are more tolerant of skew.

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -d -r1.145 -r1.146
--- dirserv.c	23 Mar 2005 06:20:50 -0000	1.145
+++ dirserv.c	23 Mar 2005 06:39:53 -0000	1.146
@@ -751,10 +751,10 @@
   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);



More information about the tor-commits mailing list