Commit b001be1e authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Log client IP address along with MAXIMUM CLIENTS reached log message

parent f0c06c07
......@@ -5160,8 +5160,8 @@ void ftp_server(void* arg)
}
if(protected_uint32_value(active_clients)>=startup->max_clients) {
lprintf(LOG_WARNING,"%04d !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, startup->max_clients);
lprintf(LOG_WARNING,"%04d [%s] !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, client_ip, startup->max_clients);
sockprintf(client_socket,-1,"421 Maximum active clients reached, please try again later.");
ftp_close_socket(&client_socket,&none,__LINE__);
continue;
......
......@@ -6337,8 +6337,8 @@ void mail_server(void* arg)
}
if(protected_uint32_value(active_clients)>=startup->max_clients) {
lprintf(LOG_WARNING,"%04d %s !MAXIMUM CLIENTS (%u) reached, access denied (%lu total)"
,client_socket, servprot, startup->max_clients, ++stats.connections_refused);
lprintf(LOG_WARNING,"%04d %s [%s] !MAXIMUM CLIENTS (%u) reached, access denied (%lu total)"
,client_socket, servprot, host_ip, startup->max_clients, ++stats.connections_refused);
sockprintf(client_socket, servprot, session, is_smtp ? smtp_error : pop_error, "Maximum active clients reached");
mswait(3000);
mail_close_socket(&client_socket, &session);
......
......@@ -2292,8 +2292,8 @@ void services_thread(void* arg)
if(service[i].max_clients && protected_uint32_value(service[i].clients) + 1 > service[i].max_clients) {
FREE_AND_NULL(udp_buf);
lprintf(LOG_WARNING,"%04d %s !MAXIMUM CLIENTS (%u) reached, access denied"
,client_socket, service[i].protocol, service[i].max_clients);
lprintf(LOG_WARNING,"%04d %s [%s] !MAXIMUM CLIENTS (%u) reached, access denied"
,client_socket, service[i].protocol, host_ip, service[i].max_clients);
close_socket(client_socket);
continue;
}
......
......@@ -7293,8 +7293,8 @@ void web_server(void* arg)
,client_socket, client_highwater);
}
if(startup->max_clients && protected_uint32_value(active_clients)>=startup->max_clients) {
lprintf(LOG_WARNING,"%04d !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, startup->max_clients);
lprintf(LOG_WARNING,"%04d [%s] !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, host_ip, startup->max_clients);
if (!len_503)
len_503 = strlen(error_503);
sendsocket(client_socket, error_503, len_503);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment