[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] backport the patch to tolerate dir mirrors with wildly skew...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] backport the patch to tolerate dir mirrors with wildly skew...
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Thu, 3 Feb 2005 18:37:23 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 03 Feb 2005 18:37:45 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/or
Modified Files:
Tag: tor-0_0_9-patches
directory.c
Log Message:
backport the patch to tolerate dir mirrors with wildly skewed clocks
Index: directory.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.181.2.11
retrieving revision 1.181.2.12
diff -u -d -r1.181.2.11 -r1.181.2.12
--- directory.c 30 Jan 2005 06:25:05 -0000 1.181.2.11
+++ directory.c 3 Feb 2005 23:37:21 -0000 1.181.2.12
@@ -591,6 +591,7 @@
int delta;
int compression;
int plausible;
+ int skewed=0;
switch (fetch_from_buf_http(conn->inbuf,
&headers, MAX_HEADERS_SIZE,
@@ -617,6 +618,7 @@
log_fn(LOG_WARN, "Received directory with skewed time: we are %d minutes %s, or the directory is %d minutes %s.",
abs(delta)/60, delta>0 ? "ahead" : "behind",
abs(delta)/60, delta>0 ? "behind" : "ahead");
+ skewed = 1; /* don't check the recommended-versions line */
} else {
log_fn(LOG_INFO, "Time on received directory is within tolerance; we are %d seconds skewed. (That's okay.)", delta);
}
@@ -687,8 +689,8 @@
tor_free(body); tor_free(headers);
return -1;
}
- if (router_load_routerlist_from_directory(body, NULL, 1, 0) < 0) {
- log_fn(LOG_WARN,"I failed to parse the directory I fetched from %s:%d. Ignoring.", conn->address, conn->port);
+ if (router_load_routerlist_from_directory(body, NULL, skewed, 0) < 0) {
+ log_fn(LOG_NOTICE,"I failed to parse the directory I fetched from %s:%d. Ignoring.", conn->address, conn->port);
} else {
log_fn(LOG_INFO,"updated routers.");
}