Started implementation of ban list. For now, just gathers the list of banned IPs from

the DHT and is not used to reject IPs yet (the DHT list is, even if DHT is desactivated).
Next steps: GUI with switch controls, exchange of IP ban lists between friends, handling IP ranges.


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8297 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-05-26 21:17:09 +00:00
parent 5200f30a32
commit 047977b645
13 changed files with 337 additions and 204 deletions

View file

@ -217,6 +217,11 @@ bool UdpBitDht::isAddressBanned(const sockaddr_in &raddr)
return mBitDhtManager->addressBanned(raddr) ;
}
bool UdpBitDht::getListOfBannedIps(std::list<bdFilteredPeer>& ipl)
{
return mBitDhtManager->getFilteredPeers(ipl) ;
}
/* stats and Dht state */

View file

@ -88,6 +88,7 @@ virtual int getDhtQueries(std::map<bdNodeId, bdQueryStatus> &queries);
virtual int getDhtQueryStatus(const bdNodeId *id, bdQuerySummary &query);
virtual bool isAddressBanned(const sockaddr_in &raddr) ;
virtual bool getListOfBannedIps(std::list<bdFilteredPeer> &ipl);
/* stats and Dht state */
virtual int startDht();
@ -111,9 +112,8 @@ virtual int status(std::ostream &out);
virtual void run();
/**** do whats to be done ***/
int tick();
private:
int tick();
private:
void clearDataTransferred();