From 7fa2109d8d1bbcdb225f63364b7b2ed828c78d1e Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 25 Nov 2006 16:48:57 +0000 Subject: [PATCH] FIXFORFIX - Fixed bug where omitting class::connfreq would result in a huge connection attempt flood when autoconnect was enabled. We now set class::connfreq to 60 if it's not specified. Reported by Milliways (#0003018). --- Changes | 6 +++--- src/s_conf.c | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Changes b/Changes index 6f408cc2f..361b35d68 100644 --- a/Changes +++ b/Changes @@ -1473,6 +1473,6 @@ patch provided by avb (#0003122). - Fixed compile bug on Solaris due to missing INADDR_NONE, fix provided by Schak (#0003125). -- Fixed bug where omitting class::connfreq would not give a config error, and would - cause a huge connection attempt flood when autoconnect was enabled. Reported by - Milliways (#0003018). +- Fixed bug where omitting class::connfreq would result in a huge connection attempt + flood when autoconnect was enabled. We now set class::connfreq to 60 if it's not + specified. Reported by Milliways (#0003018). diff --git a/src/s_conf.c b/src/s_conf.c index 14e9c3580..f1022a8b7 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -3323,6 +3323,8 @@ int _conf_class(ConfigFile *conf, ConfigEntry *ce) } ircstrdup(class->name, ce->ce_vardata); + class->connfreq = 60; /* default */ + for (cep = ce->ce_entries; cep; cep = cep->ce_next) { if (!strcmp(cep->ce_varname, "pingfreq")) @@ -3492,12 +3494,6 @@ int _test_class(ConfigFile *conf, ConfigEntry *ce) "class::pingfreq"); errors++; } - if (!has_connfreq) - { - config_error_missing(ce->ce_fileptr->cf_filename, ce->ce_varlinenum, - "class::connfreq"); - errors++; - } if (!has_maxclients) { config_error_missing(ce->ce_fileptr->cf_filename, ce->ce_varlinenum,