From 628abf114c72adb6cbdb4aaa027a1c2a2dee019c Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 25 Nov 2006 16:48:43 +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 d8c2cbc3c..1b9735d66 100644 --- a/Changes +++ b/Changes @@ -1395,6 +1395,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 c5babe047..91dcf38e3 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -3512,6 +3512,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")) @@ -3681,12 +3683,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,