mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-17 13:24:15 -05:00
use banlist instead of DHT to setup self IP
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8325 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
feaffedbb6
commit
4e9dab7e42
@ -47,7 +47,7 @@ const int p3peermgrzone = 9531;
|
||||
|
||||
#include "retroshare/rsiface.h" // Needed for rsicontrol (should remove this dependancy)
|
||||
#include "retroshare/rspeers.h" // Needed for Group Parameters.
|
||||
#include "retroshare/rsdht.h" // Needed for banned IPs
|
||||
#include "retroshare/rsbanlist.h" // Needed for banned IPs
|
||||
|
||||
/* Network setup States */
|
||||
|
||||
@ -994,7 +994,9 @@ bool p3PeerMgrIMPL::UpdateOwnAddress(const struct sockaddr_storage &localAddr,
|
||||
std::cerr << ")" << std::endl;
|
||||
#endif
|
||||
|
||||
if(rsDht->isAddressBanned(localAddr))
|
||||
uint32_t banlist_response ;
|
||||
|
||||
if(!rsBanList->isAddressAccepted(localAddr, RSBANLIST_CHECKING_FLAGS_BLACKLIST, banlist_response))
|
||||
{
|
||||
std::cerr << "(SS) Trying to set own IP to a banned IP " << sockaddr_storage_iptostring(localAddr) << ". Attack?" << std::endl;
|
||||
return false ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user