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

[or-cvs] r13213: Make "ClientOnly 1" config option disable directory ports to (in tor/trunk: . doc src/or)



Author: arma
Date: 2008-01-21 16:00:50 -0500 (Mon, 21 Jan 2008)
New Revision: 13213

Modified:
   tor/trunk/ChangeLog
   tor/trunk/doc/tor.1.in
   tor/trunk/src/or/connection.c
   tor/trunk/src/or/main.c
Log:
Make "ClientOnly 1" config option disable directory ports too.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2008-01-21 20:59:51 UTC (rev 13212)
+++ tor/trunk/ChangeLog	2008-01-21 21:00:50 UTC (rev 13213)
@@ -13,6 +13,7 @@
   o Minor features:
     - Don't answer "/tor/networkstatus-bridges" directory requests if
       the request isn't encrypted.
+    - Make "ClientOnly 1" config option disable directory ports too.
 
 
 Changes in version 0.2.0.17-alpha - 2008-01-17

Modified: tor/trunk/doc/tor.1.in
===================================================================
--- tor/trunk/doc/tor.1.in	2008-01-21 20:59:51 UTC (rev 13212)
+++ tor/trunk/doc/tor.1.in	2008-01-21 21:00:50 UTC (rev 13213)
@@ -391,7 +391,8 @@
 .LP
 .TP
 \fBClientOnly \fR\fB0\fR|\fB1\fR\fP
-If set to 1, Tor will under no circumstances run as a server. The default
+If set to 1, Tor will under no circumstances run as a server or serve
+directory requests. The default
 is to run as a client unless ORPort is configured.  (Usually,
 you don't need to set this; Tor is pretty smart at figuring out whether
 you are reliable and high-bandwidth enough to be a useful server.)

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2008-01-21 20:59:51 UTC (rev 13212)
+++ tor/trunk/src/or/connection.c	2008-01-21 21:00:50 UTC (rev 13213)
@@ -1340,7 +1340,7 @@
     return -1;
   if (retry_listeners(CONN_TYPE_DIR_LISTENER, options->DirListenAddress,
                       options->DirPort, "0.0.0.0",
-                      replaced_conns, new_conns, 0,
+                      replaced_conns, new_conns, options->ClientOnly,
                       AF_INET)<0)
     return -1;
   if (retry_listeners(CONN_TYPE_AP_LISTENER, options->SocksListenAddress,

Modified: tor/trunk/src/or/main.c
===================================================================
--- tor/trunk/src/or/main.c	2008-01-21 20:59:51 UTC (rev 13212)
+++ tor/trunk/src/or/main.c	2008-01-21 21:00:50 UTC (rev 13213)
@@ -1053,7 +1053,6 @@
 
   /** 3d. And every 60 seconds, we relaunch listeners if any died. */
   if (!we_are_hibernating() && time_to_check_listeners < now) {
-    /* 0 means "only launch the ones that died." */
     retry_all_listeners(NULL, NULL);
     time_to_check_listeners = now+60;
   }