[or-cvs] comment about a bug wrt clock skew

Roger Dingledine arma at seul.org
Sun Jan 30 00:07:33 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:
	main.c 
Log Message:
comment about a bug wrt clock skew


Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.430
retrieving revision 1.431
diff -u -d -r1.430 -r1.431
--- main.c	28 Jan 2005 08:53:47 -0000	1.430
+++ main.c	30 Jan 2005 00:07:31 -0000	1.431
@@ -869,6 +869,12 @@
   /* the second has rolled over. check more stuff. */
   bytes_written = stats_prev_global_write_bucket - global_write_bucket;
   bytes_read = stats_prev_global_read_bucket - global_read_bucket;
+  /* XXX below we get suspicious if time jumps forward more than 10
+   * seconds, but we never notice if it jumps *back* more than 10 seconds.
+   * This could be useful for detecting that we just NTP'ed to three
+   * weeks ago and it will be 3 weeks and 15 minutes until any of our
+   * events trigger.
+   */
   seconds_elapsed = current_second ? (now.tv_sec - current_second) : 0;
   stats_n_bytes_read += bytes_read;
   stats_n_bytes_written += bytes_written;



More information about the tor-commits mailing list