[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Bugfix: dyndns tor servers were needing to wait 18 hours be...



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

Modified Files:
	router.c 
Log Message:
Bugfix: dyndns tor servers were needing to wait 18 hours before they
could start doing reachability testing using the new IP address and
ports. This is because we were using the internal descriptor to learn
what to test, yet we were only rebuilding the descriptor once we
decided we were reachable.


Index: router.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.235
retrieving revision 1.236
diff -u -p -d -r1.235 -r1.236
--- router.c	14 Dec 2005 20:40:40 -0000	1.235
+++ router.c	3 Jan 2006 23:34:42 -0000	1.236
@@ -579,13 +579,18 @@ decide_if_publishable_server(time_t now)
 
 /** Initiate server descriptor upload as reasonable (if server is publishable,
  * etc).  <b>force</b> is as for router_upload_dir_desc_to_dirservers.
+ *
+ * We need to rebuild the descriptor if it's dirty even if we're not
+ * uploading, because our reachability testing *uses* our descriptor to
+ * determine what IP address and ports to test.
  */
 void
 consider_publishable_server(time_t now, int force)
 {
+  int rebuilt = router_rebuild_descriptor(0);
   if (decide_if_publishable_server(now)) {
     set_server_advertised(1);
-    if (router_rebuild_descriptor(0) == 0)
+    if (rebuilt == 0)
       router_upload_dir_desc_to_dirservers(force);
   } else {
     set_server_advertised(0);