summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
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 3977d494e4..7a7be11369 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.");