From 70d35496ef34d0ec1309efa88231e5c8386fe205 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 11 Jun 2015 21:12:20 +0000 Subject: [PATCH] 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 --- libretroshare/src/pqi/p3peermgr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc index ce23c79e5..d7d973a10 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -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; #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;