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

[or-cvs] r17627: {tor} Apply rovv's bug 805 fix: take more care never to prefer a n (in tor/trunk: . doc src/or)



Author: nickm
Date: 2008-12-15 16:17:43 -0500 (Mon, 15 Dec 2008)
New Revision: 17627

Modified:
   tor/trunk/ChangeLog
   tor/trunk/doc/TODO.021
   tor/trunk/src/or/connection_or.c
Log:
Apply rovv's bug 805 fix: take more care never to prefer a non-canonical connection.

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-12-14 20:02:00 UTC (rev 17626)
+++ tor/trunk/ChangeLog	2008-12-15 21:17:43 UTC (rev 17627)
@@ -47,6 +47,10 @@
   o Minor bugfixes:
     - Resume using the correct "REASON=" stream when telling the
       controller why we closed a stream. Bugfix in 0.2.1.1-alpha.
+    - When a canonical connection appears later in our internal list
+      than a noncanonical one for a given OR ID, always use the
+      canonical one.  Bugfix on 0.2.0.12-alpha.  Fixes bug 805.
+      Spotted by rovv.
 
   o Minor bugfixes (hidden services):
     - Do not throw away existing introduction points on SIGHUP; bugfix on

Modified: tor/trunk/doc/TODO.021
===================================================================
--- tor/trunk/doc/TODO.021	2008-12-14 20:02:00 UTC (rev 17626)
+++ tor/trunk/doc/TODO.021	2008-12-15 21:17:43 UTC (rev 17627)
@@ -168,6 +168,10 @@
     - 149: Using data from NETINFO cells
       * Don't extend a circuit over a noncanonical connection with
         mismatched address.
+        o Apply rovv's bugfixes wrt preferring canonical connections.
+        - Make sure that having a non-canonical connection doesn't count
+          as _having_ a connection for the purpose of connecting to others,
+          and that when no canonical connection exists, we make one.
       - Learn our outgoing IP address from netinfo cells?
       - Learn skew from netinfo cells?
     o 157: Make certificate downloads specific.

Modified: tor/trunk/src/or/connection_or.c
===================================================================
--- tor/trunk/src/or/connection_or.c	2008-12-14 20:02:00 UTC (rev 17626)
+++ tor/trunk/src/or/connection_or.c	2008-12-15 21:17:43 UTC (rev 17627)
@@ -478,6 +478,8 @@
       continue; /* We never prefer obsolete over non-obsolete connections. */
 
     if (
+      /* We prefer canonical connections: */
+        (!best->is_canonical && conn->is_canonical) ||
       /* We prefer non-obsolete connections: */
         (best->_base.or_is_obsolete && !conn->_base.or_is_obsolete) ||
       /* If both have circuits we prefer the newer: */