mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Prevent discovery to share local addresses if hidden
Do not query/share local addresses if hidden node as it would leak information about the location of the node
This commit is contained in:
parent
4fa6bdc789
commit
e7facc122b
@ -43,7 +43,9 @@ RsDisc *rsDisc = NULL;
|
||||
* #define P3DISC_DEBUG 1
|
||||
****/
|
||||
|
||||
static bool populateContactInfo(const peerState &detail, RsDiscContactItem *pkt,bool include_ip_information)
|
||||
static bool populateContactInfo( const peerState &detail,
|
||||
RsDiscContactItem *pkt,
|
||||
bool include_ip_information )
|
||||
{
|
||||
pkt->clear();
|
||||
|
||||
@ -352,7 +354,7 @@ void p3discovery2::sendOwnContactInfo(const SSLID &sslid)
|
||||
* is needed because RS wrongly assumes that there is just one active
|
||||
* local ip address at time. */
|
||||
std::vector<sockaddr_storage> addrs;
|
||||
if(getLocalAddresses(addrs))
|
||||
if(!detail.hiddenNode && getLocalAddresses(addrs))
|
||||
{
|
||||
/* To work around 4 addresses limitation, let's shuffle the list of
|
||||
* local addresses in the hope that with enough time every local
|
||||
|
Loading…
Reference in New Issue
Block a user