From 52d9612301283607a143ed99c468360be40862ff Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 5 Apr 2016 10:49:14 -0700 Subject: [PATCH] Reduce symmetric prediction fuzz just a bit. --- node/SelfAwareness.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/SelfAwareness.cpp b/node/SelfAwareness.cpp index c05028154..8bed0c511 100644 --- a/node/SelfAwareness.cpp +++ b/node/SelfAwareness.cpp @@ -169,7 +169,7 @@ std::vector SelfAwareness::getSymmetricNatPredictions() for(std::map< InetAddress,std::set >::iterator si(surfaces.begin());si!=surfaces.end();++si) { for(std::set::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);