[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r8522: Another tweak to guard logic: ignore check for the Guard fla (in tor/trunk: . src/or)



Author: nickm
Date: 2006-09-28 19:57:56 -0400 (Thu, 28 Sep 2006)
New Revision: 8522

Modified:
   tor/trunk/
   tor/trunk/src/or/circuitbuild.c
Log:
 r8976@Kushana:  nickm | 2006-09-28 17:18:57 -0400
 Another tweak to guard logic: ignore check for the Guard flag if a server is listed on EntryNodes.  (Also remove redundant checks for always-set variables.)



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8976] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2006-09-28 23:57:52 UTC (rev 8521)
+++ tor/trunk/src/or/circuitbuild.c	2006-09-28 23:57:56 UTC (rev 8522)
@@ -1732,15 +1732,17 @@
   char buf[HEX_DIGEST_LEN+1];
   int changed = 0;
 
+  tor_assert(options);
+
   /* Do we want to mark this guard as bad? */
   if (!ri)
     reason = "unlisted";
   else if (!ri->is_running)
     reason = "down";
-  else if (!ri->is_possible_guard)
+  else if (!ri->is_possible_guard &&
+           !router_nickname_is_in_list(ri, options->EntryNodes))
     reason = "not recommended as a guard";
-  else if (options && ri &&
-           router_nickname_is_in_list(ri, options->ExcludeNodes))
+  else if (router_nickname_is_in_list(ri, options->ExcludeNodes))
     reason = "excluded";
 
   if (reason && ! e->bad_since) {