mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 17:34:46 +02:00
Show BUG_CT_NEGATIVE_COUNTER also in non-DEBUGMODE and limit to 5:60.
Not only that one, but all BUG_CT_* connthrottle "something isn't right here" messages.
This commit is contained in:
@@ -1900,6 +1900,12 @@ void config_setdefaultsettings(Configuration *i)
|
||||
|
||||
add_log_throttle_config(&i->log_throttle, "CONNTHROTTLE_IPV6_LIMIT", 100, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "MAXPERIP_LIMIT", 100, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "BUG_CT_CHECK_DRIFT", 5, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "BUG_CT_CHECK_NO_BUCKET", 5, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "BUG_CT_CHECK_NO_IP", 5, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "BUG_CT_BUCKET_MISSING", 5, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "BUG_CT_NEGATIVE_COUNTER", 5, 60, 0);
|
||||
add_log_throttle_config(&i->log_throttle, "BUG_DECREASE_IPUSERS_BUCKET", 5, 60, 0);
|
||||
|
||||
/* TLS options */
|
||||
i->tls_options = safe_alloc(sizeof(TLSOptions));
|
||||
|
||||
@@ -1116,7 +1116,6 @@ static void ct_bucket_decrement(ConnThrottleBucket *b, ConnThrottleCategory cate
|
||||
case CT_CATEGORY_EXCEPTED_UNKNOWNS: b->excepted_unknowns--; break;
|
||||
case CT_CATEGORY_UNKNOWN_USERS: b->unknown_users--; break;
|
||||
}
|
||||
#ifdef DEBUGMODE
|
||||
if ((b->known_users < 0) || (b->excepted_unknowns < 0) || (b->unknown_users < 0))
|
||||
{
|
||||
unreal_log(ULOG_ERROR, "connthrottle", "BUG_CT_NEGATIVE_COUNTER", NULL,
|
||||
@@ -1124,9 +1123,10 @@ static void ct_bucket_decrement(ConnThrottleBucket *b, ConnThrottleCategory cate
|
||||
log_data_integer("known", b->known_users),
|
||||
log_data_integer("excepted", b->excepted_unknowns),
|
||||
log_data_integer("unknown", b->unknown_users));
|
||||
#ifdef DEBUGMODE
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/** Classify a client into one of CT_CATEGORY_*.
|
||||
|
||||
Reference in New Issue
Block a user