Apply rovv's bug 805 fix: take more care never to prefer a non-canonical connection.

svn:r17627
This commit is contained in:
Nick Mathewson 2008-12-15 21:17:43 +00:00
parent 5822e14dc9
commit 51c29e1e24
3 changed files with 10 additions and 0 deletions

View File

@ -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

View 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.

View 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: */