[or-cvs] r11922: backport r11499, r11500, r11501: hidserv hexdigests rather t (in tor/branches/tor-0_1_2-patches: . doc src/or)

arma at seul.org arma at seul.org
Sun Oct 14 07:51:40 UTC 2007


Author: arma
Date: 2007-10-14 03:51:39 -0400 (Sun, 14 Oct 2007)
New Revision: 11922

Modified:
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/doc/TODO.012
   tor/branches/tor-0_1_2-patches/src/or/rendcommon.c
   tor/branches/tor-0_1_2-patches/src/or/rendservice.c
Log:
backport r11499, r11500, r11501: hidserv hexdigests rather than nicknames


Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-10-14 07:47:30 UTC (rev 11921)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-10-14 07:51:39 UTC (rev 11922)
@@ -2,6 +2,13 @@
   o Major bugfixes:
     - Fix possible segfaults in functions called from
       rend_process_relay_cell().
+    - Hidden services were choosing introduction points uniquely by
+      hexdigest, but when constructing the hidden service descriptor
+      they merely wrote the (potentially ambiguous) nickname.
+    - Clients now use the v2 intro format for hidden service
+      connections: they specify their chosen rendezvous point by identity
+      digest rather than by (potentially ambiguous) nickname. These
+      changes could speed up hidden service connections dramatically.
 
   o Minor bugfixes:
     - Don't try to access (or alter) the state file when running

Modified: tor/branches/tor-0_1_2-patches/doc/TODO.012
===================================================================
--- tor/branches/tor-0_1_2-patches/doc/TODO.012	2007-10-14 07:47:30 UTC (rev 11921)
+++ tor/branches/tor-0_1_2-patches/doc/TODO.012	2007-10-14 07:51:39 UTC (rev 11922)
@@ -12,7 +12,7 @@
 P - r10579: new addsysuser implementation for osx (??)
   D r11287: Reject address mappings to internal addresses. (??)
     (this will break some existing test-network configurations, yes?)
-R - r11499, r11500, r11501: hidserv hexdigests rather than nicknames
+  o r11499, r11500, r11501: hidserv hexdigests rather than nicknames
 P - r11548, the osx /tmp fix
 N - r11829: Don't warn when cancel_pending_resolve() finds a cached failure.
 R - r11915: just because you hup, don't publish a near-duplicate descriptor

Modified: tor/branches/tor-0_1_2-patches/src/or/rendcommon.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/rendcommon.c	2007-10-14 07:47:30 UTC (rev 11921)
+++ tor/branches/tor-0_1_2-patches/src/or/rendcommon.c	2007-10-14 07:51:39 UTC (rev 11922)
@@ -146,7 +146,7 @@
     result->protocols = ntohs(get_uint16(cp));
     cp += 2;
   } else {
-    result->protocols = 1;
+    result->protocols = 1<<2; /* always use intro format 2 */
   }
   if (end-cp < 2) goto truncated;
   result->n_intro_points = ntohs(get_uint16(cp));

Modified: tor/branches/tor-0_1_2-patches/src/or/rendservice.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/rendservice.c	2007-10-14 07:47:30 UTC (rev 11921)
+++ tor/branches/tor-0_1_2-patches/src/or/rendservice.c	2007-10-14 07:51:39 UTC (rev 11922)
@@ -303,16 +303,17 @@
   d->intro_point_extend_info = tor_malloc_zero(sizeof(extend_info_t*)*n);
   d->protocols = (1<<2) | (1<<0); /* We support protocol 2 and protocol 0. */
   for (i=0; i < n; ++i) {
-    router = router_get_by_nickname(smartlist_get(service->intro_nodes, i),1);
+    const char *name = smartlist_get(service->intro_nodes, i);
+    router = router_get_by_nickname(name, 1);
     if (!router) {
       log_info(LD_REND,"Router '%s' not found for intro point %d. Skipping.",
-               safe_str((char*)smartlist_get(service->intro_nodes, i)), i);
+               safe_str(name), i);
       continue;
     }
     circ = find_intro_circuit(router, service->pk_digest);
     if (circ && circ->_base.purpose == CIRCUIT_PURPOSE_S_INTRO) {
       /* We have an entirely established intro circuit. */
-      d->intro_points[d->n_intro_points] = tor_strdup(router->nickname);
+      d->intro_points[d->n_intro_points] = tor_strdup(name);
       d->intro_point_extend_info[d->n_intro_points] =
         extend_info_from_router(router);
       d->n_intro_points++;



More information about the tor-commits mailing list