[or-cvs] backport: Be willing to cache directories from up to ROUTER...

Nick Mathewson nickm at seul.org
Wed Mar 23 06:43:05 UTC 2005


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

Modified Files:
      Tag: tor-0_0_9-patches
	dirserv.c 
Log Message:
backport: 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.129.2.4
retrieving revision 1.129.2.5
diff -u -d -r1.129.2.4 -r1.129.2.5
--- dirserv.c	3 Feb 2005 23:42:04 -0000	1.129.2.4
+++ dirserv.c	23 Mar 2005 06:43:02 -0000	1.129.2.5
@@ -740,10 +740,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