mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 03:56:54 +02:00
Reduce symmetric prediction fuzz just a bit.
This commit is contained in:
parent
d8b89b0c86
commit
52d9612301
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ std::vector<InetAddress> SelfAwareness::getSymmetricNatPredictions()
|
|||
for(std::map< InetAddress,std::set<InetAddress> >::iterator si(surfaces.begin());si!=surfaces.end();++si) {
|
||||
for(std::set<InetAddress>::iterator i(si->second.begin());i!=si->second.end();++i) {
|
||||
InetAddress ipp(*i);
|
||||
unsigned int p = ipp.port() + 1 + ((unsigned int)RR->node->prng() % 5);
|
||||
unsigned int p = ipp.port() + 1 + ((unsigned int)RR->node->prng() & 3);
|
||||
if (p >= 65535)
|
||||
p -= 64510; // NATs seldom use ports <=1024 so wrap to 1025
|
||||
ipp.setPort(p);
|
||||
|
|
Loading…
Add table
Reference in a new issue