improved debug output for early address rejection

This commit is contained in:
csoler 2016-06-09 18:12:04 -04:00
parent 226e85c9ba
commit 38b86c37ab

View File

@ -374,11 +374,15 @@ int pqissllistenbase::acceptconnection()
#endif
/********************************** WINDOWS/UNIX SPECIFIC PART ******************/
std::cerr << "(II) Checking incoming connection address: " << sockaddr_storage_iptostring(remote_addr) ;
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;
std::cerr << " => early rejected at this point, because of blacklist." << std::endl;
return false ;
}
else
std::cerr << " => Accepted (i.e. whitelisted, or not blacklisted)." << std::endl;
{
std::string out;
out += "Accepted Connection from ";