[or-cvs] r16729: {tor} backport r16698: don't use a new entry guard that's also you (in tor/branches/tor-0_2_0-patches: . doc src/or)

arma at seul.org arma at seul.org
Mon Sep 1 22:25:03 UTC 2008


Author: arma
Date: 2008-09-01 18:25:02 -0400 (Mon, 01 Sep 2008)
New Revision: 16729

Modified:
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/doc/TODO.020
   tor/branches/tor-0_2_0-patches/src/or/circuitbuild.c
Log:
backport r16698: don't use a new entry guard that's also your exit


Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-09-01 22:08:13 UTC (rev 16728)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-09-01 22:25:02 UTC (rev 16729)
@@ -7,6 +7,10 @@
       a digest of all zeroes, or asks to extend back to the relay that
       sent the extend cell, tear down the circuit. Ideas suggested
       by rovv.
+    - If not enough of our entry guards are available so we add a new
+      one, we might use the new one even if it overlapped with the
+      current circuit's exit relay (or its family). Anonymity bugfix
+      pointed out by rovv.
 
  o Minor bugfixes:
     - Fix a small alignment and memory-wasting bug on buffer chunks.  Spotted

Modified: tor/branches/tor-0_2_0-patches/doc/TODO.020
===================================================================
--- tor/branches/tor-0_2_0-patches/doc/TODO.020	2008-09-01 22:08:13 UTC (rev 16728)
+++ tor/branches/tor-0_2_0-patches/doc/TODO.020	2008-09-01 22:25:02 UTC (rev 16729)
@@ -13,5 +13,5 @@
   - r16143: generate stream close events from connection_edge_destroy().
   o r16450: open /dev/pf before dropping privileges.
   o r16605: relays reject risky extend cells.
-  - r16698: don't use a new entry guard that's also your exit.
+  o r16698: don't use a new entry guard that's also your exit.
 

Modified: tor/branches/tor-0_2_0-patches/src/or/circuitbuild.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/circuitbuild.c	2008-09-01 22:08:13 UTC (rev 16728)
+++ tor/branches/tor-0_2_0-patches/src/or/circuitbuild.c	2008-09-01 22:25:02 UTC (rev 16729)
@@ -2503,8 +2503,13 @@
        * be a long time til we get it. -RD */
       r = add_an_entry_guard(NULL, 0);
       if (r) {
-        smartlist_add(live_entry_guards, r);
         entry_guards_changed();
+        /* XXX we start over here in case the new node we added shares
+         * a family with our exit node. There's a chance that we'll just
+         * load up on entry guards here, if the network we're using is
+         * one big family. Perhaps we should teach add_an_entry_guard()
+         * to understand nodes-to-avoid-if-possible? -RD */
+        goto retry;
       }
     }
     if (!r && need_uptime) {



More information about the tor-commits mailing list