diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc index 7ca1713f7..1daf78e45 100644 --- a/libretroshare/src/pqi/p3netmgr.cc +++ b/libretroshare/src/pqi/p3netmgr.cc @@ -1119,12 +1119,7 @@ bool p3NetMgrIMPL::checkNetAddress() #ifdef NETMGR_DEBUG std::cerr << "p3NetMgrIMPL::checkNetAddress() Correcting Port to DEFAULT" << std::endl; #endif - // Generate a default port from SSL id. The port will always be the - // same, but appear random from peer to peer. - // Random port avoids clashes, improves anonymity. - // - - int new_port = htons(PQI_MIN_PORT_RNG + (RSRandom::random_u32() % (PQI_MAX_PORT - PQI_MIN_PORT_RNG))); + uint16_t new_port = htons(PQI_MIN_PORT_RNG + (RSRandom::random_u32() % (PQI_MAX_PORT - PQI_MIN_PORT_RNG))); sockaddr_storage_setport(mLocalAddr, new_port); addrChanged = true;