mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 19:12:28 -04:00
Fixed Bug in choosing port for Proxy UDP. Chooses a Random one between 30000-50000.
It was using the same port as the DHT, and switching to a Random one, on its own. * Added debugging for net reset. * Added further debugging for ssl (reset + killing existing connections) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4530 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
91b37be2e5
commit
8066862833
3 changed files with 55 additions and 8 deletions
|
@ -1939,14 +1939,14 @@ int RsServer::StartupRetroShare()
|
|||
|
||||
// NOW WE BUILD THE SECOND STACK.
|
||||
// Create the Second UdpStack... Port should be random (but openable!).
|
||||
// XXX TODO
|
||||
#define MIN_RANDOM_PORT 10000
|
||||
#define MAX_RANDOM_PORT 30000
|
||||
|
||||
#define MIN_RANDOM_PORT 30000
|
||||
#define MAX_RANDOM_PORT 50000
|
||||
|
||||
struct sockaddr_in sndladdr;
|
||||
sockaddr_clear(&sndladdr);
|
||||
uint16_t rndport = MIN_RANDOM_PORT + RSRandom::random_u32() % (MAX_RANDOM_PORT - MIN_RANDOM_PORT);
|
||||
sndladdr.sin_port = htons(RsInitConfig::port);
|
||||
sndladdr.sin_port = htons(rndport);
|
||||
rsFixedUdpStack *mProxyStack = new rsFixedUdpStack(sndladdr);
|
||||
|
||||
// FIRSTLY THE PROXY STUNNER.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue