[or-cvs] If we think of ourselves as authoritative, even if we"re not

arma at seul.org arma at seul.org
Sat Apr 8 21:19:42 UTC 2006


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

Modified Files:
	routerlist.c 
Log Message:
If we think of ourselves as authoritative, even if we're not
in the DirServers config lines, then we still are. This way we
give ourselves the "Authority" flag in our network-status.


Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.488
retrieving revision 1.489
diff -u -p -d -r1.488 -r1.489
--- routerlist.c	8 Apr 2006 06:56:38 -0000	1.488
+++ routerlist.c	8 Apr 2006 21:19:40 -0000	1.489
@@ -1031,6 +1031,9 @@ router_digest_is_trusted_dir(const char 
 {
   if (!trusted_dir_servers)
     return 0;
+  if (get_options()->AuthoritativeDir &&
+      router_digest_is_me(digest))
+    return 1;
   SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, ent,
                     if (!memcmp(digest, ent->digest, DIGEST_LEN)) return 1);
   return 0;



More information about the tor-commits mailing list