diff --git a/Changes b/Changes index 820afa43a..f1b464d66 100644 --- a/Changes +++ b/Changes @@ -2962,3 +2962,5 @@ seen. gmtime warning still there - Added class::pingfreq checking, should be 30-600 now.. else you might get mysterious (mass) disconnect issues. - Lol, I made /connect dissapear during modulizing ;). +- Added a warning if your listen portrange affects >100 ports + (eg for idiots doing 6667-7000 which uses 333 sockets). diff --git a/src/s_conf.c b/src/s_conf.c index a6c32ebf9..fd0d8d2f1 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -3659,6 +3659,13 @@ int _test_listen(ConfigFile *conf, ConfigEntry *ce) ce->ce_fileptr->cf_filename, ce->ce_varlinenum); return 1; } + if (end - start > 100) + { + config_error("%s:%i: listen: you requested port %d-%d, that's %d ports " + "(and thus consumes %d sockets) this is probably not what you want.", + ce->ce_fileptr->cf_filename, ce->ce_varlinenum, start, end, end - start, end - start); + return 1; + } if ((start < 0) || (start > 65535) || (end < 0) || (end > 65535)) { config_error("%s:%i: listen: illegal port range values must be between 0 and 65535",