mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 00:19:30 -05:00
only update peer IPs form discovery for non hidden nodes
This commit is contained in:
parent
abe3527635
commit
90a11a1236
@ -373,12 +373,15 @@ void p3discovery2::recvOwnContactInfo(const RsPeerId &fromId, const RsDiscContac
|
||||
}
|
||||
|
||||
// Peer Own Info replaces the existing info, because the
|
||||
// peer is the primary source of his own IPs.
|
||||
// peer is the primary source of his own IPs, except for hidden nodes
|
||||
// that normally send nothing. We still ignore it as a double security.
|
||||
|
||||
mPeerMgr->setNetworkMode(fromId, item->netMode);
|
||||
mPeerMgr->setLocation(fromId, item->location);
|
||||
mPeerMgr->setVisState(fromId, item->vs_disc, item->vs_dht);
|
||||
|
||||
if(!mPeerMgr->isHiddenNode(fromId))
|
||||
{
|
||||
if(!det.localAddr.empty())
|
||||
{
|
||||
if(sockaddr_storage_isValidNet(item->localAddrV4.addr))
|
||||
@ -394,6 +397,7 @@ void p3discovery2::recvOwnContactInfo(const RsPeerId &fromId, const RsDiscContac
|
||||
else if(sockaddr_storage_isValidNet(item->extAddrV6.addr))
|
||||
mPeerMgr->setExtAddress(fromId,item->extAddrV6.addr);
|
||||
}
|
||||
}
|
||||
|
||||
setPeerVersion(fromId, item->version);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user