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

[or-cvs] backport tolerating trusted dirserver with 0 dirport



Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/tor-010x/tor/src/or

Modified Files:
      Tag: tor-0_1_0-patches
	router.c routerlist.c 
Log Message:
backport tolerating trusted dirserver with 0 dirport


Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.176.2.3
retrieving revision 1.176.2.4
diff -u -d -r1.176.2.3 -r1.176.2.4
--- router.c	1 Jul 2005 01:56:07 -0000	1.176.2.3
+++ router.c	15 Jul 2005 18:58:58 -0000	1.176.2.4
@@ -817,7 +817,8 @@
     router->nickname,
     router->address,
     router->or_port,
-    check_whether_dirport_reachable() ? router->dir_port : 0,
+    (authdir_mode(get_options()) || check_whether_dirport_reachable())
+      ? router->dir_port : 0,
     router->platform,
     published,
     fingerprint,

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.235
retrieving revision 1.235.2.1
diff -u -d -r1.235 -r1.235.2.1
--- routerlist.c	18 May 2005 03:52:07 -0000	1.235
+++ routerlist.c	15 Jul 2005 18:58:58 -0000	1.235.2.1
@@ -235,8 +235,8 @@
 static void mark_all_trusteddirservers_up(void) {
   if (routerlist) {
     SMARTLIST_FOREACH(routerlist->routers, routerinfo_t *, router,
-                 if (router_digest_is_trusted_dir(router->identity_digest)) {
-                   tor_assert(router->dir_port > 0);
+                 if (router_digest_is_trusted_dir(router->identity_digest) &&
+                     router->dir_port > 0) {
                    router->is_running = 1;
                    router->status_set_at = time(NULL);
                  });