From 4b81b4004d086555885d5e4a2541b0a92eb4a9ae Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 18 Feb 2013 19:56:05 +0100 Subject: m_kicknorejoin Limit time to 30m by default In the current implementation we only expire entries when someone joins, without a limit it was possible to make us practically never remove entries and consume (a tiny amount of) memory for each entry until the mode was removed/parameter was changed The default limit of 30m is chosen to not surprise people when they upgrade. If you need to prevent rejoins for more than a minute then you should set a (timed)ban instead Config option is available to change the limit (2.0 only) --- docs/conf/modules.conf.example | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 0e7b3a29b..7a6c478f1 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -954,6 +954,8 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Anti-Auto-Rejoin: Adds support for prevention of auto-rejoin (+J) # +# Set the maximum time that is accepted as a parameter for +J here. +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Knock module: adds the /KNOCK command and +K channel mode -- cgit v1.3.1-10-gc9f91 From b742311a7039655c63c4d08902b43cebdeeb8d33 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 23 Apr 2013 15:01:15 +0200 Subject: Add config option to disable somaxconn range() check --- docs/conf/inspircd.conf.example | 6 ++++++ src/configreader.cpp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'docs') 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(), ""); - range(MaxConn, 0, SOMAXCONN, SOMAXCONN, ""); + if (ConfValue("performance")->getBool("limitsomaxconn", true)) + range(MaxConn, 0, SOMAXCONN, SOMAXCONN, ""); range(MaxTargets, 1, 31, 20, ""); range(NetBufferSize, 1024, 65534, 10240, ""); range(WhoWasGroupSize, 0, 10000, 10, ""); -- cgit v1.3.1-10-gc9f91