[or-cvs] oops, we were ignoring options->ExcludeNodes when picking e...

arma at seul.org arma at seul.org
Tue Jul 4 20:25:19 UTC 2006


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c config.c 
Log Message:
oops, we were ignoring options->ExcludeNodes when picking entry guards.

it is still the case that we ignore it with respect to entry guards
that we've already picked.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -p -d -r1.252 -r1.253
--- circuitbuild.c	4 Jul 2006 03:19:59 -0000	1.252
+++ circuitbuild.c	4 Jul 2006 20:25:16 -0000	1.253
@@ -1574,6 +1574,7 @@ choose_good_entry_server(uint8_t purpose
   }
 
   excluded = smartlist_create();
+  add_nickname_list_to_smartlist(excluded,options->ExcludeNodes,0,0,1);
 
   if (state && (r = build_state_get_exit_router(state))) {
     smartlist_add(excluded, r);

Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.567
retrieving revision 1.568
diff -u -p -d -r1.567 -r1.568
--- config.c	12 Jun 2006 06:03:15 -0000	1.567
+++ config.c	4 Jul 2006 20:25:17 -0000	1.568
@@ -808,6 +808,12 @@ options_act(or_options_t *old_options)
        !opt_streq(old_options->EntryNodes, options->EntryNodes)))
     entry_nodes_should_be_added();
 
+  /* If the user wants to avoid certain nodes, make sure none of them
+   * are already entryguards */
+  if (options->ExcludeNodes) {
+    // XXX TODO
+  }
+
   /* Since our options changed, we might need to regenerate and upload our
    * server descriptor.
    */



More information about the tor-commits mailing list