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

[or-cvs] Backport] Avoid potential infinite recursion when building ...



Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv14724/src/or

Modified Files:
      Tag: tor-0_1_0-patches
	router.c 
Log Message:
[Backport] Avoid potential infinite recursion when building a descriptor.  (I am not sure 0.1.0.x can trigger this, but better safe. ) 

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.176.2.7
retrieving revision 1.176.2.8
diff -u -d -r1.176.2.7 -r1.176.2.8
--- router.c	12 Oct 2005 04:08:02 -0000	1.176.2.7
+++ router.c	1 Dec 2005 02:28:41 -0000	1.176.2.8
@@ -388,7 +388,7 @@
 /** Return 1 if we don't have a dirport configured, or if it's reachable. */
 int check_whether_dirport_reachable(void) {
   routerinfo_t *ri = router_get_my_routerinfo();
-  return !get_options()->DirPort || (ri && !ri->dir_port)
+  return !get_options()->DirPort || we_are_hibernating()
     || can_reach_dir_port;
 }