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

[or-cvs] r15113: In very rare situations new hidden service descriptors were (tor/trunk/src/or)



Author: kloesing
Date: 2008-06-10 19:31:55 -0400 (Tue, 10 Jun 2008)
New Revision: 15113

Modified:
   tor/trunk/src/or/rendservice.c
Log:
In very rare situations new hidden service descriptors were published earlier than 30 seconds after the last change to the service, with the 30 seconds being the current voodoo saying that a descriptor is stable.

Modified: tor/trunk/src/or/rendservice.c
===================================================================
--- tor/trunk/src/or/rendservice.c	2008-06-10 23:13:14 UTC (rev 15112)
+++ tor/trunk/src/or/rendservice.c	2008-06-10 23:31:55 UTC (rev 15113)
@@ -1335,8 +1335,10 @@
   for (i=0; i < smartlist_len(rend_service_list); ++i) {
     service = smartlist_get(rend_service_list, i);
     if (!service->next_upload_time) { /* never been uploaded yet */
+      /* The fixed lower bound of 30 seconds ensures that the descriptor
+       * is stable before being published. See comment below. */
       service->next_upload_time =
-        now + crypto_rand_int(2*rendpostperiod);
+        now + 30 + crypto_rand_int(2*rendpostperiod);
     }
     if (service->next_upload_time < now ||
         (service->desc_is_dirty &&