[or-cvs] old or skewed descriptor doesn"t mean we failed to parse it

Roger Dingledine arma at seul.org
Mon Mar 29 23:23:04 UTC 2004


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

Modified Files:
	directory.c dirserv.c 
Log Message:
old or skewed descriptor doesn't mean we failed to parse it


Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- directory.c	29 Mar 2004 22:18:05 -0000	1.69
+++ directory.c	29 Mar 2004 23:23:01 -0000	1.70
@@ -198,10 +198,10 @@
           log_fn(LOG_INFO,"eof (status 200) while reading upload response: finished.");
           break;
         case 400:
-          log_fn(LOG_WARN,"http status 400 (bad request) from dirserver. Is your clock skewed?");
+          log_fn(LOG_WARN,"http status 400 (bad request) response from dirserver.");
           break;
         case 403:
-          log_fn(LOG_WARN,"http status 403 (unapproved server) from dirserver. Have you mailed arma your identity fingerprint? Are you using the right key?");
+          log_fn(LOG_WARN,"http status 403 (unapproved server) response from dirserver. Is your clock skewed? Have you mailed arma your identity fingerprint? Are you using the right key?");
 
           break;
       }
@@ -258,7 +258,7 @@
   cp = body;
   switch(dirserv_add_descriptor(&cp)) {
     case -1:
-      /* malformed descriptor, or clock is skewed, or something wrong */
+      /* malformed descriptor, or something wrong */
       connection_write_to_buf(answer400, strlen(answer400), conn);
       break;
     case 0:

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dirserv.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- dirserv.c	29 Mar 2004 19:53:53 -0000	1.32
+++ dirserv.c	29 Mar 2004 23:23:01 -0000	1.33
@@ -186,8 +186,8 @@
 }
 
 /* Return 1 if descriptor is well-formed and accepted;
- * 0 if well-formed and server is unapproved;
- * -1 if not well-formed or if clock is skewed or other error.
+ * 0 if well-formed and server or descriptor is unapproved;
+ * -1 if not well-formed or other error.
  *
  * Update *desc to point after the descriptor if the
  * descriptor is well-formed.
@@ -248,16 +248,16 @@
   /* Is there too much clock skew? */
   now = time(NULL);
   if (ri->published_on > now+ROUTER_ALLOW_SKEW) {
-    log_fn(LOG_WARN, "Publication time for nickname %s is too far in the future; possible clock skew. Not adding", ri->nickname);
+    log_fn(LOG_WARN, "Publication time for nickname %s is too far in the future; possible clock skew. Not adding.", ri->nickname);
     routerinfo_free(ri);
     *desc = end;
-    return -1;
+    return 0;
   }
   if (ri->published_on < now-ROUTER_MAX_AGE) {
-    log_fn(LOG_WARN, "Publication time for router with nickname %s is too far in the past. Not adding", ri->nickname);
+    log_fn(LOG_WARN, "Publication time for router with nickname %s is too far in the past. Not adding.", ri->nickname);
     routerinfo_free(ri);
     *desc = end;
-    return -1;
+    return 0;
   }
 
   /* Do we already have an entry for this router? */



More information about the tor-commits mailing list