]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Apply rovv's bug 805 fix: take more care never to prefer a non-canonical connection.
authorNick Mathewson <nickm@torproject.org>
Mon, 15 Dec 2008 21:17:43 +0000 (21:17 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 15 Dec 2008 21:17:43 +0000 (21:17 +0000)
svn:r17627

ChangeLog
doc/TODO.021
src/or/connection_or.c

index f9660654948c470eb0f7cee9a62ca6bbe6c37a10..5ed6859f4cabfff32ebc350a1634c2a26d412b96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,10 @@ Changes in version 0.2.1.9-alpha - 200?-??-??
   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
index 745c998780f488d0f4bdabbe29ef5f5af6d412f9..734e13ded21d6d2c64defdfb3694517607f7a19c 100644 (file)
@@ -168,6 +168,10 @@ K   o 155: Four Improvements of Hidden Service Performance
     - 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.
index 40dab3e4f025702552cf2e16f5a47c3223fbbbda..028f3ded79c3aae32223b793f57ef6611268073c 100644 (file)
@@ -478,6 +478,8 @@ connection_or_get_by_identity_digest(const char *digest)
       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: */