aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m42
-rw-r--r--changes/bug104055
-rw-r--r--changes/bug106164
-rw-r--r--changes/bug1217011
-rw-r--r--changes/bug121957
-rw-r--r--src/or/command.c4
-rw-r--r--src/or/connection_edge.c22
-rw-r--r--src/or/main.c2
-rw-r--r--src/or/nodelist.c6
9 files changed, 51 insertions, 12 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 294373414..7401e0b24 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -115,7 +115,7 @@ if test -f /etc/fedora-release && test x"$tor_$1_$2_redhat" != x; then
fi
else
if test -f /etc/redhat-release && test x"$tor_$1_$2_redhat" != x; then
- AC_WARN([On most Redhat-based systems, you can get$h $1 by installing the $tor_$1_$2_redhat" RPM package])
+ AC_WARN([On most Redhat-based systems, you can get$h $1 by installing the $tor_$1_$2_redhat RPM package])
if test x"$tor_$1_$2_redhat" != x"$tor_$1_devpkg_redhat"; then
AC_WARN([ You will probably need to install $tor_$1_devpkg_redhat too.])
fi
diff --git a/changes/bug10405 b/changes/bug10405
new file mode 100644
index 000000000..d1110e44e
--- /dev/null
+++ b/changes/bug10405
@@ -0,0 +1,5 @@
+ o Minor bugfixes:
+ - Avoid "Tried to open a socket with DisableNetwork set" warnings
+ when starting a client with bridges configured and DisableNetwork
+ set. (Tor launcher starts Tor with DisableNetwork set the first
+ time.) Fixes bug 10405; bugfix on 0.2.3.9-alpha.
diff --git a/changes/bug10616 b/changes/bug10616
new file mode 100644
index 000000000..26f0bda85
--- /dev/null
+++ b/changes/bug10616
@@ -0,0 +1,4 @@
+ o Bugfixes:
+ - Squelch a spurious LD_BUG message "No origin circuit for successful
+ SOCKS stream" in certain hidden service failure cases; fixes bug
+ #10616.
diff --git a/changes/bug12170 b/changes/bug12170
new file mode 100644
index 000000000..e462e4fa7
--- /dev/null
+++ b/changes/bug12170
@@ -0,0 +1,11 @@
+ o Major bugfixes (performance):
+ - Do not recompute whether we have sufficient information to build
+ circuits every time we make a successful connection. Previously,
+ we would forget our cached value for this flag every time we
+ successfully opened a channel (or marked a router as running or not
+ running for any
+ other reason), regardless of whether we had
+ previously believed the router to be running. This forced us to
+ run a fairly expensive update operation with relatively
+ high frequency.
+ Fixes bug 12170; bugfix on 0.1.2.1-alpha.
diff --git a/changes/bug12195 b/changes/bug12195
new file mode 100644
index 000000000..f798129e6
--- /dev/null
+++ b/changes/bug12195
@@ -0,0 +1,7 @@
+ o Major bugfixes:
+ - When a circuit accidentally has the same circuit ID for its
+ forward and reverse direction, correctly detect the direction of
+ cells using that circuit. Previously, this would have made
+ roughly one circuit in a million non-functional. Fixes bug
+ 12195; this is a bugfix on every version of Tor.
+
diff --git a/src/or/command.c b/src/or/command.c
index 9b3ff16f2..105bdc637 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -376,7 +376,7 @@ command_process_created_cell(cell_t *cell, channel_t *chan)
return;
}
- if (circ->n_circ_id != cell->circ_id) {
+ if (circ->n_circ_id != cell->circ_id || circ->n_chan != chan) {
log_fn(LOG_PROTOCOL_WARN,LD_PROTOCOL,
"got created cell from Tor client? Closing.");
circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL);
@@ -461,6 +461,7 @@ command_process_relay_cell(cell_t *cell, channel_t *chan)
}
if (!CIRCUIT_IS_ORIGIN(circ) &&
+ chan == TO_OR_CIRCUIT(circ)->p_chan &&
cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id)
direction = CELL_DIRECTION_OUT;
else
@@ -529,6 +530,7 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan)
circ->received_destroy = 1;
if (!CIRCUIT_IS_ORIGIN(circ) &&
+ chan == TO_OR_CIRCUIT(circ)->p_chan &&
cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id) {
/* the destroy came from behind */
circuit_set_p_circid_chan(TO_OR_CIRCUIT(circ), 0, NULL);
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index a8ad9ec2e..49f9ba497 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2295,13 +2295,21 @@ connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply,
endreason == END_STREAM_REASON_RESOURCELIMIT) {
if (!conn->edge_.on_circuit ||
!CIRCUIT_IS_ORIGIN(conn->edge_.on_circuit)) {
- // DNS remaps can trigger this. So can failed hidden service
- // lookups.
- log_info(LD_BUG,
- "No origin circuit for successful SOCKS stream "U64_FORMAT
- ". Reason: %d",
- U64_PRINTF_ARG(ENTRY_TO_CONN(conn)->global_identifier),
- endreason);
+ if (endreason != END_STREAM_REASON_RESOLVEFAILED) {
+ log_info(LD_BUG,
+ "No origin circuit for successful SOCKS stream "U64_FORMAT
+ ". Reason: %d",
+ U64_PRINTF_ARG(ENTRY_TO_CONN(conn)->global_identifier),
+ endreason);
+ }
+ /*
+ * Else DNS remaps and failed hidden service lookups can send us
+ * here with END_STREAM_REASON_RESOLVEFAILED; ignore it
+ *
+ * Perhaps we could make the test more precise; we can tell hidden
+ * services by conn->edge_.renddata != NULL; anything analogous for
+ * the DNS remap case?
+ */
} else {
// XXX: Hrmm. It looks like optimistic data can't go through this
// codepath, but someone should probably test it and make sure.
diff --git a/src/or/main.c b/src/or/main.c
index a3be9a20d..3c661cd12 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1247,7 +1247,7 @@ run_scheduled_events(time_t now)
now + DESCRIPTOR_FAILURE_RESET_INTERVAL;
}
- if (options->UseBridges)
+ if (options->UseBridges && !options->DisableNetwork)
fetch_bridge_descriptors(options, now);
/* 1b. Every MAX_SSL_KEY_LIFETIME_INTERNAL seconds, we change our
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 09232f9f9..8f870816d 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -1249,10 +1249,12 @@ router_set_status(const char *digest, int up)
if (!up && node_is_me(node) && !net_is_disabled())
log_warn(LD_NET, "We just marked ourself as down. Are your external "
"addresses reachable?");
+
+ if (bool_neq(node->is_running, up))
+ router_dir_info_changed();
+
node->is_running = up;
}
-
- router_dir_info_changed();
}
/** True iff, the last time we checked whether we had enough directory info