aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug13924-fix-testing-reachability7
-rw-r--r--src/or/circuitbuild.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/changes/bug13924-fix-testing-reachability b/changes/bug13924-fix-testing-reachability
new file mode 100644
index 0000000000..914a159007
--- /dev/null
+++ b/changes/bug13924-fix-testing-reachability
@@ -0,0 +1,7 @@
+ o Minor bugfixes:
+ - Stop assuming that private addresses are local when checking
+ reachability in a TestingTorNetwork. Instead, when testing, assume
+ all OR connections are remote. (This is necessary due to many test
+ scenarios running all nodes on localhost.)
+ This assists in bootstrapping a testing Tor network.
+ Fixes bugs 13718 & 13924.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index a834e7b7fc..7061ab0e0b 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1378,8 +1378,10 @@ onionskin_answer(or_circuit_t *circ,
log_debug(LD_CIRC,"Finished sending '%s' cell.",
circ->is_first_hop ? "created_fast" : "created");
- if (!channel_is_local(circ->p_chan) &&
- !channel_is_outgoing(circ->p_chan)) {
+ /* Ignore the local bit when testing - many test networks run on local
+ * addresses */
+ if ((!channel_is_local(circ->p_chan) || get_options()->TestingTorNetwork)
+ && !channel_is_outgoing(circ->p_chan)) {
/* record that we could process create cells from a non-local conn
* that we didn't initiate; presumably this means that create cells
* can reach us too. */