Opened 12 years ago

Last modified 7 years ago

#654 closed defect (Fixed)

Don't re-use entry point for testing circuits

Reported by: nickm Owned by:
Priority: Low Milestone: post 0.2.0.x
Component: Core Tor/Tor Version: 0.2.0.23-rc
Severity: Keywords:
Cc: nickm, arma Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Moving from TODO into a bug report, since this is a bug:

  • we try to build 4 test circuits to break them over different servers. but sometimes our entry node is the same for multiple test circuits. this defeats the point.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (4)

comment:1 Changed 11 years ago by arma

Josh Albrecht sends us:

Index: circuitbuild.c
===================================================================
--- circuitbuild.c (revision 15682)
+++ circuitbuild.c (working copy)
@@ -1618,13 +1618,16 @@

static routerinfo_t *
choose_good_entry_server(uint8_t purpose, cpath_build_state_t *state)
{

+ circuit_t *circ;

routerinfo_t *r, *choice;
smartlist_t *excluded;
or_options_t *options = get_options();

  • (void)purpose; /* not used yet. */

+ (void)purpose; /* not used yet. */

  • if (state && options->UseEntryGuards) {
  • return choose_random_entry(state);

+ if (purpose != CIRCUIT_PURPOSE_TESTING &&
+ state &&
+ options->UseEntryGuards) {
+ return choose_random_entry(state);

}


excluded = smartlist_create();

@@ -1653,6 +1656,18 @@

});

}


+ /* exclude routers that are currently being used as test circuit entry router
s */
+ if (purpose == CIRCUIT_PURPOSE_TESTING) {
+ for (circ = global_circuitlist; circ; circ = circ->next) {
+ if (!circ->marked_for_close && CIRCUIT_IS_ORIGIN(circ) &
&
+ circ->purpose == CIRCUIT_PURPOSE_TESTING

&&

+ circ->state == CIRCUIT_STATE_OPEN) {
+ r = router_get_by_digest(circ->n_conn_id_digest);
+ smartlist_add(excluded, r);
+ }
+ }
+ }
+

choice = router_choose_random_node(

NULL, options->ExcludeNodes,
excluded, state ? state->need_uptime : 0,

comment:2 Changed 11 years ago by arma

I added the first part of this, with a modification to make bridge relays
safer, as r15850.

I think you're right that the second part of the patch makes Tor work
less well on tiny networks. Rather than complexifying stuff even further
to handle that, I am tempted to leave things as-is, and figure that
probabilistically we're doing quite well now, particularly since relays
do another bandwidth test after a day if their first one didn't work out
so well.

comment:3 Changed 11 years ago by arma

flyspray2trac: bug closed.
Thanks!

comment:4 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.