mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-05 04:44:19 -04:00
Improve discovery
Workaround RS single local address flawed assumption by spreading all viables local addrresses via discovery Spread addresses also through hidden node as they are the only hope to help direct connection happening for common trusted nodes behind nasty firewalls
This commit is contained in:
parent
2044a2c848
commit
4fa6bdc789
2 changed files with 87 additions and 39 deletions
|
@ -1024,17 +1024,6 @@ bool p3NetMgrIMPL::checkNetAddress()
|
|||
std::vector<sockaddr_storage> addrs;
|
||||
if (getLocalAddresses(addrs))
|
||||
{
|
||||
|
||||
/* To work around one address limitation, to shuffle the list of
|
||||
* local addresses in the hope that with enough time every local
|
||||
* address is advertised to trusted nodes so they may try to
|
||||
* connect to all of them including the most convenient if a local
|
||||
* connection exists, is a bad idea. It would cause net reset every
|
||||
* time a different local address is selected, potentially breaking
|
||||
* broader RS assumptions.
|
||||
*/
|
||||
//std::random_shuffle(addrs.begin(), addrs.end());
|
||||
|
||||
for (auto it = addrs.begin(); it!=addrs.end(); ++it)
|
||||
{
|
||||
sockaddr_storage& addr(*it);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue