]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
In very rare situations new hidden service descriptors were published earlier than...
authorKarsten Loesing <karsten.loesing@gmx.net>
Tue, 10 Jun 2008 23:31:55 +0000 (23:31 +0000)
committerKarsten Loesing <karsten.loesing@gmx.net>
Tue, 10 Jun 2008 23:31:55 +0000 (23:31 +0000)
svn:r15113

src/or/rendservice.c

index 21163cf0c2b9a7fff8aa69bd955df5820c2f57d5..bf5eb3889ad75ced4b28975b8643f06d284421f3 100644 (file)
@@ -1335,8 +1335,10 @@ rend_consider_services_upload(time_t now)
   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 &&