Add config option to disable somaxconn range() check

This commit is contained in:
attilamolnar 2013-04-23 15:01:15 +02:00
parent 25d00181cd
commit b742311a70
2 changed files with 8 additions and 1 deletions

View File

@ -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"

View File

@ -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>");