summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-06-23 18:52:12 +0000
committerRoger Dingledine <arma@torproject.org>2008-06-23 18:52:12 +0000
commit80f03b67ef39fe613ca662bb0cf7b0371abe535d (patch)
tree982773d68276868ef11eb9217ddcfd7dd5077447
parentbe21d71eee380ecc263fa144b59f3d91756c129a (diff)
downloadtor-80f03b67ef39fe613ca662bb0cf7b0371abe535d.tar.gz
tor-80f03b67ef39fe613ca662bb0cf7b0371abe535d.zip
backport r15366, bump to 0.2.0.28-rc-dev
svn:r15435
-rw-r--r--ChangeLog13
-rw-r--r--configure.in2
-rw-r--r--contrib/tor-mingw.nsi.in2
-rw-r--r--doc/TODO.0202
-rw-r--r--src/or/circuitbuild.c5
-rw-r--r--src/or/circuituse.c17
-rw-r--r--src/or/connection_edge.c24
-rw-r--r--src/or/or.h3
-rw-r--r--src/win32/orconfig.h2
9 files changed, 52 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 14730083eb..36d243fa2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,15 @@
-Changes in version 0.2.0.29 - 2008-06-13
+Changes in version 0.2.0.29 - 2008-06-xx
+ o Major bugfixes:
+ - If you have more than one bridge but don't know their keys,
+ you would only learn a request for the descriptor of the first one
+ on your list. (Tor considered launching requests for the others, but
+ found that it already had a connection on the way for $0000...0000
+ so it didn't open another.)
+ - If you have more than one bridge but don't know their keys, and the
+ connection to one of the bridges failed, you would cancel all
+ pending bridge connections. (After all, they all have the same
+ digest.)
+
o Minor bugfixes:
- Fix a macro/CPP interactions that was confusing some compilers:
some GCCs don't like #if/#endif pairs inside macro arguments.
diff --git a/configure.in b/configure.in
index 8ea03d0b38..aa0da50177 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@ dnl Copyright (c) 2007-2008, The Tor Project, Inc.
dnl See LICENSE for licensing information
AC_INIT
-AM_INIT_AUTOMAKE(tor, 0.2.0.28-rc)
+AM_INIT_AUTOMAKE(tor, 0.2.0.28-rc-dev)
AM_CONFIG_HEADER(orconfig.h)
AC_CANONICAL_HOST
diff --git a/contrib/tor-mingw.nsi.in b/contrib/tor-mingw.nsi.in
index e48fbfb44e..222b4ee25c 100644
--- a/contrib/tor-mingw.nsi.in
+++ b/contrib/tor-mingw.nsi.in
@@ -9,7 +9,7 @@
!include "FileFunc.nsh"
!insertmacro GetParameters
-!define VERSION "0.2.0.28-rc"
+!define VERSION "0.2.0.28-rc-dev"
!define INSTALLER "tor-${VERSION}-win32.exe"
!define WEBSITE "https://www.torproject.org/"
!define LICENSE "LICENSE"
diff --git a/doc/TODO.020 b/doc/TODO.020
index dc6c9e2351..fa3385d48c 100644
--- a/doc/TODO.020
+++ b/doc/TODO.020
@@ -5,7 +5,7 @@ description of the patch.)
Items before a stable 0.2.0.x bundle:
- Tor items:
R - releasenotes
- - backport r15366
+ o backport r15366
- Vidalia items:
E d address arma's Linux 100% cpu bug
- Torbutton items:
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index b403fc2ed9..bb302836f7 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -412,8 +412,9 @@ circuit_n_conn_done(or_connection_t *or_conn, int status)
smartlist_t *pending_circs;
int err_reason = 0;
- log_debug(LD_CIRC,"or_conn to %s, status=%d",
- or_conn->nickname ? or_conn->nickname : "NULL", status);
+ log_debug(LD_CIRC,"or_conn to %s/%s, status=%d",
+ or_conn->nickname ? or_conn->nickname : "NULL",
+ or_conn->_base.address, status);
pending_circs = smartlist_create();
circuit_get_all_pending_on_or_conn(pending_circs, or_conn);
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index e37b4153a6..d8ac174309 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -95,10 +95,19 @@ circuit_is_acceptable(circuit_t *circ, edge_connection_t *conn,
tor_assert(conn->chosen_exit_name);
if (build_state->chosen_exit) {
char digest[DIGEST_LEN];
- if (hexdigest_to_digest(conn->chosen_exit_name, digest) < 0 ||
- memcmp(digest, build_state->chosen_exit->identity_digest,
- DIGEST_LEN))
+ if (hexdigest_to_digest(conn->chosen_exit_name, digest) < 0)
+ return 0; /* broken digest, we don't want it */
+ if (memcmp(digest, build_state->chosen_exit->identity_digest,
+ DIGEST_LEN))
return 0; /* this is a circuit to somewhere else */
+ if (tor_digest_is_zero(digest)) {
+ /* we don't know the digest; have to compare addr:port */
+ struct in_addr in;
+ if (!tor_inet_aton(conn->socks_request->address, &in) ||
+ build_state->chosen_exit->addr != ntohl(in.s_addr) ||
+ build_state->chosen_exit->port != conn->socks_request->port)
+ return 0;
+ }
}
} else {
if (conn->want_onehop) {
@@ -748,7 +757,7 @@ circuit_build_failed(origin_circuit_t *circ)
}
/* if there are any one-hop streams waiting on this circuit, fail
* them now so they can retry elsewhere. */
- connection_ap_fail_onehop(circ->_base.n_conn_id_digest);
+ connection_ap_fail_onehop(circ->_base.n_conn_id_digest, circ->build_state);
}
switch (circ->_base.purpose) {
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 3987cafffa..a9b930b42f 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -460,7 +460,8 @@ connection_ap_attach_pending(void)
/** Tell any AP streams that are waiting for a onehop tunnel to
* <b>failed_digest</b> that they are going to fail. */
void
-connection_ap_fail_onehop(const char *failed_digest)
+connection_ap_fail_onehop(const char *failed_digest,
+ cpath_build_state_t *build_state)
{
edge_connection_t *edge_conn;
char digest[DIGEST_LEN];
@@ -474,12 +475,23 @@ connection_ap_fail_onehop(const char *failed_digest)
edge_conn = TO_EDGE_CONN(conn);
if (!edge_conn->want_onehop)
continue;
- if (!hexdigest_to_digest(edge_conn->chosen_exit_name, digest) &&
- !memcmp(digest, failed_digest, DIGEST_LEN)) {
- log_info(LD_APP, "Closing onehop stream to '%s' because the OR conn "
- "just failed.", edge_conn->chosen_exit_name);
- connection_mark_unattached_ap(edge_conn, END_STREAM_REASON_TIMEOUT);
+ if (hexdigest_to_digest(edge_conn->chosen_exit_name, digest) < 0 ||
+ memcmp(digest, failed_digest, DIGEST_LEN))
+ continue;
+ if (tor_digest_is_zero(digest)) {
+ /* we don't know the digest; have to compare addr:port */
+ struct in_addr in;
+ if (!build_state || !build_state->chosen_exit ||
+ !edge_conn->socks_request || !edge_conn->socks_request->address ||
+ !tor_inet_aton(edge_conn->socks_request->address, &in) ||
+ build_state->chosen_exit->addr != ntohl(in.s_addr) ||
+ build_state->chosen_exit->port != edge_conn->socks_request->port)
+ continue;
}
+ log_info(LD_APP, "Closing onehop stream to '%s/%s' because the OR conn "
+ "just failed.", edge_conn->chosen_exit_name,
+ edge_conn->socks_request->address);
+ connection_mark_unattached_ap(edge_conn, END_STREAM_REASON_TIMEOUT);
});
}
diff --git a/src/or/or.h b/src/or/or.h
index 6e7654ca15..e1a2fe6d9e 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2812,7 +2812,8 @@ int connection_edge_is_rendezvous_stream(edge_connection_t *conn);
int connection_ap_can_use_exit(edge_connection_t *conn, routerinfo_t *exit);
void connection_ap_expire_beginning(void);
void connection_ap_attach_pending(void);
-void connection_ap_fail_onehop(const char *failed_digest);
+void connection_ap_fail_onehop(const char *failed_digest,
+ cpath_build_state_t *build_state);
void circuit_discard_optional_exit_enclaves(extend_info_t *info);
int connection_ap_detach_retriable(edge_connection_t *conn,
origin_circuit_t *circ,
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index 57f0308bb2..7a6c1516a9 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -227,6 +227,6 @@
#define USING_TWOS_COMPLEMENT
/* Version number of package */
-#define VERSION "0.2.0.28-rc"
+#define VERSION "0.2.0.28-rc-dev"