improved security message in console for whitelisted peers

This commit is contained in:
csoler 2015-08-13 21:49:57 -04:00
parent caa97cce70
commit 3084d2a5ee

View File

@ -1322,7 +1322,9 @@ int pqissl::Authorise_SSL_Connection()
if(!rsBanList->isAddressAccepted(remote_addr,checking_flags,&check_result))
{
std::cerr << "(SS) connection attempt from banned IP address " << sockaddr_storage_iptostring(remote_addr) << ". Refusing it. Reason: " << check_result << ". Attack??" << std::endl;
std::cerr << "(SS) refusing connection attempt from IP address " << sockaddr_storage_iptostring(remote_addr) << ". Reason: " <<
((check_result == RSBANLIST_CHECK_RESULT_NOT_WHITELISTED)?"not whitelisted (peer requires whitelist)":"blacklisted") << std::endl;
RsServer::notify()->AddFeedItem(RS_FEED_ITEM_SEC_IP_BLACKLISTED, PeerId().toStdString(), sockaddr_storage_iptostring(remote_addr), "", "", check_result);
reset_locked();
return 0 ;