mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 00:55:13 -04:00
refusing connections from banned peers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8293 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
79882695b7
commit
482c488b46
3 changed files with 19 additions and 1 deletions
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "pqi/p3linkmgr.h"
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsdht.h>
|
||||
|
||||
const int pqisslzone = 37714;
|
||||
|
||||
|
@ -1309,6 +1310,12 @@ int pqissl::Authorise_SSL_Connection()
|
|||
bool res = AuthSSL::getAuthSSL()->CheckCertificate(PeerId(), peercert);
|
||||
bool certCorrect = true; /* WE know it okay already! */
|
||||
|
||||
if(rsDht->isAddressBanned(remote_addr))
|
||||
{
|
||||
std::cerr << "(SS) connection attempt from banned IP address. Refusing it. Attack??" << std::endl;
|
||||
reset_locked();
|
||||
return 0 ;
|
||||
}
|
||||
// check it's the right one.
|
||||
if (certCorrect)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue