mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-18 05:44:14 -05:00
changed the order of upnp/stun and extaddrFinder to limit wrong analysis of firewalled situation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1302 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5e91af8be0
commit
f16c136cbb
@ -64,8 +64,6 @@ const uint32_t MAX_UPNP_INIT = 10; /* seconds UPnP timeout */
|
|||||||
* #define P3CONNMGR_NO_AUTO_CONNECTION 1
|
* #define P3CONNMGR_NO_AUTO_CONNECTION 1
|
||||||
***/
|
***/
|
||||||
|
|
||||||
#define CONN_DEBUG 1
|
|
||||||
|
|
||||||
const uint32_t P3CONNMGR_TCP_DEFAULT_DELAY = 2; /* 2 Seconds? is it be enough! */
|
const uint32_t P3CONNMGR_TCP_DEFAULT_DELAY = 2; /* 2 Seconds? is it be enough! */
|
||||||
const uint32_t P3CONNMGR_UDP_DHT_DELAY = DHT_NOTIFY_PERIOD + 60; /* + 1 minute for DHT POST */
|
const uint32_t P3CONNMGR_UDP_DHT_DELAY = DHT_NOTIFY_PERIOD + 60; /* + 1 minute for DHT POST */
|
||||||
const uint32_t P3CONNMGR_UDP_PROXY_DELAY = 30; /* 30 seconds (NOT IMPLEMENTED YET!) */
|
const uint32_t P3CONNMGR_UDP_PROXY_DELAY = 30; /* 30 seconds (NOT IMPLEMENTED YET!) */
|
||||||
@ -610,7 +608,14 @@ void p3ConnectMgr::netUdpCheck()
|
|||||||
/* get the addr from the configuration */
|
/* get the addr from the configuration */
|
||||||
struct sockaddr_in iaddr = ownState.localaddr;
|
struct sockaddr_in iaddr = ownState.localaddr;
|
||||||
|
|
||||||
if (mUpnpAddrValid)
|
if(use_extr_addr_finder && mExtAddrFinder->hasValidIP(&tmpip))
|
||||||
|
{
|
||||||
|
extValid = true;
|
||||||
|
extAddr = tmpip ;
|
||||||
|
extAddr.sin_port = iaddr.sin_port ;
|
||||||
|
extAddrStable = true;
|
||||||
|
}
|
||||||
|
else if (mUpnpAddrValid)
|
||||||
{
|
{
|
||||||
extValid = true;
|
extValid = true;
|
||||||
extAddr = mUpnpExtAddr;
|
extAddr = mUpnpExtAddr;
|
||||||
@ -622,13 +627,6 @@ void p3ConnectMgr::netUdpCheck()
|
|||||||
extAddr = mStunExtAddr;
|
extAddr = mStunExtAddr;
|
||||||
extAddrStable = mStunAddrStable;
|
extAddrStable = mStunAddrStable;
|
||||||
}
|
}
|
||||||
else if(use_extr_addr_finder && mExtAddrFinder->hasValidIP(&tmpip))
|
|
||||||
{
|
|
||||||
extValid = true;
|
|
||||||
extAddr = tmpip ;
|
|
||||||
extAddr.sin_port = iaddr.sin_port ;
|
|
||||||
extAddrStable = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (extValid)
|
if (extValid)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user