mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 14:12:43 -04: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
1 changed files with 4 additions and 2 deletions
|
@ -43,7 +43,9 @@ RsDisc *rsDisc = NULL;
|
||||||
* #define P3DISC_DEBUG 1
|
* #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();
|
pkt->clear();
|
||||||
|
|
||||||
|
@ -352,7 +354,7 @@ void p3discovery2::sendOwnContactInfo(const SSLID &sslid)
|
||||||
* is needed because RS wrongly assumes that there is just one active
|
* is needed because RS wrongly assumes that there is just one active
|
||||||
* local ip address at time. */
|
* local ip address at time. */
|
||||||
std::vector<sockaddr_storage> addrs;
|
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
|
/* To work around 4 addresses limitation, let's shuffle the list of
|
||||||
* local addresses in the hope that with enough time every local
|
* local addresses in the hope that with enough time every local
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue