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

[or-cvs] r16404: In some edge cases it occurs that the router descriptor of a (in tor/trunk: . src/or)



Author: kloesing
Date: 2008-08-04 19:35:12 -0400 (Mon, 04 Aug 2008)
New Revision: 16404

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/rendservice.c
Log:
In some edge cases it occurs that the router descriptor of a previously picked introduction point becomes obsolete. In that case, don't stick to using that introduction point, but simply give up on it. Reverts some part of r15825.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-08-04 22:49:12 UTC (rev 16403)
+++ tor/trunk/ChangeLog	2008-08-04 23:35:12 UTC (rev 16404)
@@ -7,7 +7,13 @@
       been established before, a false assertion was triggered. Noticed by
       phobos, fixed by karsten. Bugfix on 0.2.1.3-alpha.
 
+  o Minor bugfixes:
+    - In some edge cases it occurs that the router descriptor of a
+      previously picked introduction point becomes obsolete. In that case,
+      don't stick to using this introduction point, but simply give up on
+      it. Observed by xiando. Bugfix on 0.2.1.3-alpha.
 
+
 Changes in version 0.2.1.3-alpha - 2008-08-03
   o Bootstrapping bugfixes (on 0.2.1.x-alpha):
     - Send a bootstrap problem "warn" event on the first problem if the

Modified: tor/trunk/src/or/rendservice.c
===================================================================
--- tor/trunk/src/or/rendservice.c	2008-08-04 22:49:12 UTC (rev 16403)
+++ tor/trunk/src/or/rendservice.c	2008-08-04 23:35:12 UTC (rev 16404)
@@ -1228,14 +1228,8 @@
     for (j=0; j < smartlist_len(service->intro_nodes); ++j) {
       intro = smartlist_get(service->intro_nodes, j);
       router = router_get_by_digest(intro->extend_info->identity_digest);
-      if (!router) {
-        log_warn(LD_BUG, "We have picked router %s as introduction point, "
-                         "but we don't have its router descriptor. Skipping.",
-                 intro->extend_info->nickname);
-        continue;
-      }
-      if (!find_intro_circuit(intro, service->pk_digest,
-                              service->descriptor_version)) {
+      if (!router || !find_intro_circuit(intro, service->pk_digest,
+                                         service->descriptor_version)) {
         log_info(LD_REND,"Giving up on %s as intro point for %s.",
                  intro->extend_info->nickname, service->service_id);
         if (service->desc) {
@@ -1254,7 +1248,8 @@
         smartlist_del(service->intro_nodes,j--);
         changed = 1;
       }
-      smartlist_add(intro_routers, router);
+      if (router)
+        smartlist_add(intro_routers, router);
     }
 
     /* We have enough intro points, and the intro points we thought we had were