]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add config option to disable somaxconn range() check
authorattilamolnar <attilamolnar@hush.com>
Tue, 23 Apr 2013 13:01:15 +0000 (15:01 +0200)
committerattilamolnar <attilamolnar@hush.com>
Tue, 23 Apr 2013 13:01:15 +0000 (15:01 +0200)
docs/conf/inspircd.conf.example
src/configreader.cpp

index 0767e9ff5a2ec716ad9ebea1307fb02bc6a72023..ca61bb416d75f8dbb89865d88b79081ff8b93f2a 100644 (file)
              # 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"
index 2577b83b800f6719fd93ef3eb71bfbd71c6468af..e8707cc3edfa18f6192b753a00f27f8ad8edf9cf 100644 (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>");