# HG changeset patch # User Matthew Wild # Date 1701964010 0 # Node ID e79f9dec35c021d2a020082f14db3949a097c99f # Parent 076b79eb747fb25d064fe89fae377573c97a55ed mod_c2s_conn_throttle: Reduce log level from error->info Our general policy is that "error" should never be triggerable by remote entities, and that it is always about something that requires admin intervention. This satisfies neither condition. The "warn" level can be used for unexpected events/behaviour triggered by remote entities, and this could qualify. However I don't think failed auth attempts are unexpected enough. I selected "info" because it is what is also used for other notable session lifecycle events. diff -r 076b79eb747f -r e79f9dec35c0 mod_c2s_conn_throttle/mod_c2s_conn_throttle.lua --- a/mod_c2s_conn_throttle/mod_c2s_conn_throttle.lua Thu Dec 07 15:43:47 2023 +0000 +++ b/mod_c2s_conn_throttle/mod_c2s_conn_throttle.lua Thu Dec 07 15:46:50 2023 +0000 @@ -15,7 +15,7 @@ if in_count[session.ip].starttls_c then in_count[session.ip].c = in_count[session.ip].starttls_c else in_count[session.ip].c = in_count[session.ip].c + 1 end if in_count[session.ip].c > logins_count and time() - in_count[session.ip].t < throttle_time then - module:log("error", "Exceeded login count for %s, closing connection", session.ip) + module:log("info", "Exceeded login count for %s, closing connection", session.ip) session:close{ condition = "policy-violation", text = "You exceeded the number of connections/logins allowed in "..throttle_time.." seconds, good bye." } return true elseif time() - in_count[session.ip].t > throttle_time then