Skip to content
Snippets Groups Projects
Commit 31d07482 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Remove 3 second delay before disconnecting when max clients reached

This seems to be misguided and would only increase the chances of a DoS-type attack on TCP session resources.

A second 3-second delay upon malloc failure is also removed.
parent f00fe334
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1080 passed
......@@ -5325,7 +5325,6 @@ void DLLCALL ftp_server(void* arg)
lprintf(LOG_WARNING,"%04d !MAXIMUM CLIENTS (%d) reached, access denied"
,client_socket, startup->max_clients);
sockprintf(client_socket,-1,"421 Maximum active clients reached, please try again later.");
mswait(3000);
ftp_close_socket(&client_socket,&none,__LINE__);
continue;
}
......@@ -5334,7 +5333,6 @@ void DLLCALL ftp_server(void* arg)
lprintf(LOG_CRIT,"%04d !ERROR allocating %d bytes of memory for ftp_t"
,client_socket,(int)sizeof(ftp_t));
sockprintf(client_socket,-1,"421 System error, please try again later.");
mswait(3000);
ftp_close_socket(&client_socket,&none,__LINE__);
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment