diff --git a/libretroshare/src/services/p3banlist.cc b/libretroshare/src/services/p3banlist.cc index 419d262b0..65bde2325 100644 --- a/libretroshare/src/services/p3banlist.cc +++ b/libretroshare/src/services/p3banlist.cc @@ -333,7 +333,7 @@ bool p3BanList::isAddressAccepted(const sockaddr_storage &addr, uint32_t checkin { ++it->second.connect_attempts; //#ifdef DEBUG_BANLIST - std::cerr << "found in blacklisted range " << sockaddr_storage_iptostring(it->first) << "/24. returning false. attempts=" << it->second.connect_attempts << std::endl; + std::cerr << " found in blacklisted range " << sockaddr_storage_iptostring(it->first) << "/24. returning false. attempts=" << it->second.connect_attempts << std::endl; //#endif if(check_result != NULL) *check_result = RSBANLIST_CHECK_RESULT_BLACKLISTED ; @@ -344,7 +344,7 @@ bool p3BanList::isAddressAccepted(const sockaddr_storage &addr, uint32_t checkin { ++it->second.connect_attempts; //#ifdef DEBUG_BANLIST - std::cerr << "found in blacklisted range " << sockaddr_storage_iptostring(it->first) << "/32. returning false. attempts=" << it->second.connect_attempts << std::endl; + std::cerr << " found in blacklisted range " << sockaddr_storage_iptostring(it->first) << "/32. returning false. attempts=" << it->second.connect_attempts << std::endl; //#endif if(check_result != NULL) *check_result = RSBANLIST_CHECK_RESULT_BLACKLISTED ; diff --git a/libretroshare/src/services/p3discovery2.cc b/libretroshare/src/services/p3discovery2.cc index 687e23bc4..e949527e8 100644 --- a/libretroshare/src/services/p3discovery2.cc +++ b/libretroshare/src/services/p3discovery2.cc @@ -849,8 +849,9 @@ void p3discovery2::processContactInfo(const SSLID &fromId, const RsDiscContactIt RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/ if (item->sslId == rsPeers->getOwnId()) - { - mPeerMgr->addCandidateForOwnExternalAddress(item->PeerId(), item->extAddrV4.addr) ; + { + if(sockaddr_storage_isExternalNet(item->extAddrV4.addr)) + mPeerMgr->addCandidateForOwnExternalAddress(item->PeerId(), item->extAddrV4.addr) ; #ifdef P3DISC_DEBUG std::cerr << "p3discovery2::processContactInfo(" << fromId << ") PGPID: "; std::cerr << item->pgpId << " Ignoring Info on self";