summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-23 15:01:15 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-23 15:01:15 +0200
commitb742311a7039655c63c4d08902b43cebdeeb8d33 (patch)
tree15366c71acfbf11d205ef24943ee6ba0e16324c4
parent25d00181cd5a6b89c926e188e5f7569335ca64d0 (diff)
Add config option to disable somaxconn range() check
-rw-r--r--docs/conf/inspircd.conf.example6
-rw-r--r--src/configreader.cpp3
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example
index 0767e9ff5..ca61bb416 100644
--- a/docs/conf/inspircd.conf.example
+++ b/docs/conf/inspircd.conf.example
@@ -639,6 +639,12 @@
# to 5, while others (such as linux and *BSD) default to 128.
somaxconn="128"
+ # limitsomaxconn: By default, somaxconn (see above) is limited to a
+ # safe maximum value in the 2.0 branch for compatibility reasons.
+ # This setting can be used to disable this limit, forcing InspIRCd
+ # to use the value specifed above.
+ limitsomaxconn="true"
+
# softlimit: This optional feature allows a defined softlimit for
# connections. If defined, it sets a soft max connections value.
softlimit="12800"
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 2577b83b8..e8707cc3e 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -554,7 +554,8 @@ void ServerConfig::Fill()
WelcomeNotice = options->getBool("welcomenotice", true);
range(SoftLimit, 10, ServerInstance->SE->GetMaxFds(), ServerInstance->SE->GetMaxFds(), "<performance:softlimit>");
- range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>");
+ if (ConfValue("performance")->getBool("limitsomaxconn", true))
+ range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>");
range(MaxTargets, 1, 31, 20, "<security:maxtargets>");
range(NetBufferSize, 1024, 65534, 10240, "<performance:netbuffersize>");
range(WhoWasGroupSize, 0, 10000, 10, "<whowas:groupsize>");