mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
added early discarding of incoming connection attempt (before SSL handshake) for blacklisted IPs
This commit is contained in:
parent
617a863f12
commit
2f4f44ee48
1 changed files with 12 additions and 6 deletions
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
#include "util/rsdebug.h"
|
#include "util/rsdebug.h"
|
||||||
#include "util/rsstring.h"
|
#include "util/rsstring.h"
|
||||||
|
#include "retroshare/rsbanlist.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
const int pqissllistenzone = 49787;
|
const int pqissllistenzone = 49787;
|
||||||
|
@ -373,6 +374,11 @@ int pqissllistenbase::acceptconnection()
|
||||||
#endif
|
#endif
|
||||||
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
|
||||||
|
|
||||||
|
if(rsBanList != NULL && !rsBanList->isAddressAccepted(remote_addr, RSBANLIST_CHECKING_FLAGS_BLACKLIST))
|
||||||
|
{
|
||||||
|
std::cerr << "(II) pqissllistenner::acceptConnection(): early denying connection attempt from blacklisted IP " << sockaddr_storage_iptostring(remote_addr) << std::endl;
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
std::string out;
|
std::string out;
|
||||||
out += "Accepted Connection from ";
|
out += "Accepted Connection from ";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue