mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Fix Reachability self-tests in test networks
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.
This commit is contained in:
parent
c3a4201faa
commit
2b8e1f9133
2 changed files with 11 additions and 2 deletions
7
changes/bug13924-fix-testing-reachability
Normal file
7
changes/bug13924-fix-testing-reachability
Normal file
|
@ -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.
|
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue