added check for whitelist before sending a Security item for IP changed.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8419 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-11 21:12:20 +00:00
parent 0de1d047a4
commit 70d35496ef

View File

@ -1275,9 +1275,9 @@ bool p3PeerMgrIMPL::addCandidateForOwnExternalAddress(const RsPeerId &from, cons
std::cerr << " current external address is known to be " << sockaddr_storage_iptostring(own_addr) << std::endl; std::cerr << " current external address is known to be " << sockaddr_storage_iptostring(own_addr) << std::endl;
#endif #endif
// Notify for every friend that has reported a wrong external address // Notify for every friend that has reported a wrong external address, except if that address is in the IP whitelist.
if(!sockaddr_storage_sameip(own_addr,addr_filtered)) if((!rsBanList->isAddressAccepted(addr_filtered,RSBANLIST_CHECKING_FLAGS_WHITELIST)) && (!sockaddr_storage_sameip(own_addr,addr_filtered)))
{ {
std::cerr << " Peer " << from << " reports a connexion address (" << sockaddr_storage_iptostring(addr_filtered) <<") that is not your current external address (" << sockaddr_storage_iptostring(own_addr) << "). This is weird." << std::endl; std::cerr << " Peer " << from << " reports a connexion address (" << sockaddr_storage_iptostring(addr_filtered) <<") that is not your current external address (" << sockaddr_storage_iptostring(own_addr) << "). This is weird." << std::endl;