[or-cvs] backport TestVia, but don"t add it to the man page.
arma at seul.org
arma at seul.org
Sat Jun 10 00:32:33 UTC 2006
Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/tor-011x/tor/src/or
Modified Files:
Tag: tor-0_1_1-patches
circuitbuild.c config.c or.h
Log Message:
backport TestVia, but don't add it to the man page.
Index: circuitbuild.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.230.2.5
retrieving revision 1.230.2.6
diff -u -p -d -r1.230.2.5 -r1.230.2.6
--- circuitbuild.c 9 Jun 2006 09:08:48 -0000 1.230.2.5
+++ circuitbuild.c 10 Jun 2006 00:32:31 -0000 1.230.2.6
@@ -1501,7 +1501,8 @@ choose_good_middle_server(uint8_t purpos
}
}
choice = router_choose_random_node(
- NULL, get_options()->ExcludeNodes, excluded,
+ purpose == CIRCUIT_PURPOSE_TESTING ? get_options()->TestVia : NULL,
+ get_options()->ExcludeNodes, excluded,
state->need_uptime, state->need_capacity, 0,
get_options()->_AllowInvalid & ALLOW_INVALID_MIDDLE, 0);
smartlist_free(excluded);
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.554.2.5
retrieving revision 1.554.2.6
diff -u -p -d -r1.554.2.5 -r1.554.2.6
--- config.c 24 May 2006 11:14:00 -0000 1.554.2.5
+++ config.c 10 Jun 2006 00:32:31 -0000 1.554.2.6
@@ -233,6 +233,7 @@ static config_var_t _option_vars[] = {
VAR("StrictExitNodes", BOOL, StrictExitNodes, "0"),
VAR("SysLog", LINELIST_S, OldLogOptions, NULL),
VAR("TestSocks", BOOL, TestSocks, "0"),
+ VAR("TestVia", STRING, TestVia, NULL),
VAR("TrackHostExits", CSV, TrackHostExits, NULL),
VAR("TrackHostExitsExpire",INTERVAL, TrackHostExitsExpire, "30 minutes"),
OBSOLETE("TrafficShaping"),
@@ -2425,6 +2426,8 @@ options_validate(or_options_t *old_optio
return -1;
if (check_nickname_list(options->RendNodes, "RendExcludeNodes", msg))
return -1;
+ if (check_nickname_list(options->TestVia, "TestVia", msg))
+ return -1;
if (check_nickname_list(options->MyFamily, "MyFamily", msg))
return -1;
for (cl = options->NodeFamilies; cl; cl = cl->next) {
Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.824.2.5
retrieving revision 1.824.2.6
diff -u -p -d -r1.824.2.5 -r1.824.2.6
--- or.h 18 Apr 2006 03:50:00 -0000 1.824.2.5
+++ or.h 10 Jun 2006 00:32:31 -0000 1.824.2.6
@@ -1342,6 +1342,7 @@ typedef struct {
int NumCpus; /**< How many CPUs should we try to use? */
int RunTesting; /**< If true, create testing circuits to measure how well the
* other ORs are running. */
+ char *TestVia; /**< When reachability testing, use these as middle hop. */
config_line_t *RendConfigLines; /**< List of configuration lines
* for rendezvous services. */
char *ContactInfo; /**< Contact info to be published in the directory */
More information about the tor-commits
mailing list