diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-04-05 10:49:14 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-04-05 10:49:14 -0700 |
commit | 52d9612301283607a143ed99c468360be40862ff (patch) | |
tree | f1773fd45fddba18c9866388bfc4f10cc52f421f /node | |
parent | d8b89b0c86e9454ce95a7c7ad07549ceeba916a0 (diff) | |
download | infinitytier-52d9612301283607a143ed99c468360be40862ff.tar.gz infinitytier-52d9612301283607a143ed99c468360be40862ff.zip |
Reduce symmetric prediction fuzz just a bit.
Diffstat (limited to 'node')
-rw-r--r-- | node/SelfAwareness.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node/SelfAwareness.cpp b/node/SelfAwareness.cpp index c0502815..8bed0c51 100644 --- a/node/SelfAwareness.cpp +++ b/node/SelfAwareness.cpp @@ -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); |