summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-01-21 21:00:50 +0000
committerRoger Dingledine <arma@torproject.org>2008-01-21 21:00:50 +0000
commitb79850d5748879109484a72615105c57a6de2d0a (patch)
tree09c723ff4e1c6831df27b7d46e4a93e8b11df945
parente7853ba3eb9ec381b49828e42b21ab5a0f268009 (diff)
downloadtor-b79850d5748879109484a72615105c57a6de2d0a.tar.gz
tor-b79850d5748879109484a72615105c57a6de2d0a.zip
Make "ClientOnly 1" config option disable directory ports too.
svn:r13213
-rw-r--r--ChangeLog1
-rw-r--r--doc/tor.1.in3
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/main.c1
4 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b618d51f5..89b291cf0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ Changes in version 0.2.0.18-alpha - 2008-01-??
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
diff --git a/doc/tor.1.in b/doc/tor.1.in
index 500fed0066..c3c07c4c94 100644
--- a/doc/tor.1.in
+++ b/doc/tor.1.in
@@ -391,7 +391,8 @@ circuit list.
.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.)
diff --git a/src/or/connection.c b/src/or/connection.c
index 757516c66f..31c9c170f0 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1340,7 +1340,7 @@ retry_all_listeners(smartlist_t *replaced_conns,
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,
diff --git a/src/or/main.c b/src/or/main.c
index 607fed35cf..17ee14651f 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1053,7 +1053,6 @@ run_scheduled_events(time_t now)
/** 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;
}