aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-09-03 18:36:40 +0000
committerRoger Dingledine <arma@torproject.org>2002-09-03 18:36:40 +0000
commit27adc0f20bd0d5f0e5b90a695394518072316d8d (patch)
tree55d1c382625bd234734c21bc1850e86f3629c830 /src/or/config.c
parentdb4c2140c36be56fdcdd1f5a0af88006c225f67b (diff)
downloadtor-27adc0f20bd0d5f0e5b90a695394518072316d8d.tar
tor-27adc0f20bd0d5f0e5b90a695394518072316d8d.tar.gz
enforce maxconn; bugfix to not tear down the parent when we hit maxconn
svn:r86
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 3977d494e..7a7be1136 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -218,6 +218,12 @@ RETURN VALUE: 0 on success, non-zero on error
code = -1;
}
+ if ( options->MaxConn >= MAXCONNECTIONS )
+ {
+ log(LOG_ERR,"MaxConn option must be less than %d.", MAXCONNECTIONS);
+ code = -1;
+ }
+
if ( options->TrafficShaping != 0 && options->TrafficShaping != 1 )
{
log(LOG_ERR,"TrafficShaping option must be either 0 or 1.");