summaryrefslogtreecommitdiff
path: root/net-p2p/retroshare/files
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-07-19 09:11:12 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-07-19 09:11:12 +0300
commitec00c00f97804a03ba4bbb5f1dd3b44efb6d7448 (patch)
tree2b522dabf00b9ec07c81ab49b2a58f4c631c6931 /net-p2p/retroshare/files
parentc76773e77552f17db546e1f9af2533f7b2f76c59 (diff)
retroshare: merget listen address patch with upstream
Diffstat (limited to 'net-p2p/retroshare/files')
-rw-r--r--net-p2p/retroshare/files/hidden_service.patch57
1 files changed, 21 insertions, 36 deletions
diff --git a/net-p2p/retroshare/files/hidden_service.patch b/net-p2p/retroshare/files/hidden_service.patch
index 048c13d..e1e2de4 100644
--- a/net-p2p/retroshare/files/hidden_service.patch
+++ b/net-p2p/retroshare/files/hidden_service.patch
@@ -1,49 +1,40 @@
diff --git a/libretroshare/src/pqi/p3netmgr.cc b/libretroshare/src/pqi/p3netmgr.cc
-index bc5a6f1..63ee8e2 100644
+index a34119ed5..895ffe8c0 100644
--- a/libretroshare/src/pqi/p3netmgr.cc
+++ b/libretroshare/src/pqi/p3netmgr.cc
-@@ -1014,7 +1014,7 @@ bool p3NetMgrIMPL::checkNetAddress()
+@@ -1015,7 +1015,7 @@ bool p3NetMgrIMPL::checkNetAddress()
std::cerr << "p3NetMgrIMPL::checkNetAddress() LOOPBACK ... forcing to 127.0.0.1";
std::cerr << std::endl;
#endif
- sockaddr_storage_ipv4_aton(prefAddr, "127.0.0.1");
-+ sockaddr_storage_ipv4_aton(prefAddr, "0.0.0.0"); //wtf ??
++ sockaddr_storage_ipv4_aton(prefAddr, "0.0.0.0");
validAddr = true;
}
else
-@@ -1077,7 +1077,7 @@ bool p3NetMgrIMPL::checkNetAddress()
- #endif
-
- // update address.
-- sockaddr_storage_copyip(mLocalAddr, prefAddr);
-+ sockaddr_storage_copyip(mLocalAddr, prefAddr); //wtf ??!
- mNetFlags.mLocalAddr = mLocalAddr;
-
- if(sockaddr_storage_isLoopbackNet(mLocalAddr))
diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc
-index f85edb5..680a84f 100644
+index f224465a5..8319ef7b1 100644
--- a/libretroshare/src/pqi/p3peermgr.cc
+++ b/libretroshare/src/pqi/p3peermgr.cc
-@@ -73,7 +73,7 @@ static struct RsLog::logInfo p3peermgrzoneInfo = {RsLog::Default, "p3peermgr"};
+@@ -74,7 +74,7 @@ static struct RsLog::logInfo p3peermgrzoneInfo = {RsLog::Default, "p3peermgr"};
#define MAX_AVAIL_PERIOD 230 //times a peer stay in available state when not connected
#define MIN_RETRY_PERIOD 140
-static const std::string kConfigDefaultProxyServerIpAddr = "127.0.0.1";
-+static const std::string kConfigDefaultProxyServerIpAddr = "0.0.0.0"; //wtf ?
++static const std::string kConfigDefaultProxyServerIpAddr = "0.0.0.0";
static const uint16_t kConfigDefaultProxyServerPortTor = 9050; // standard port.
static const uint16_t kConfigDefaultProxyServerPortI2P = 4447; // I2Pd's standard port
-@@ -214,7 +214,7 @@ bool p3PeerMgrIMPL::forceHiddenNode()
+@@ -215,7 +215,7 @@ bool p3PeerMgrIMPL::forceHiddenNode()
// Force the Port.
struct sockaddr_storage loopback;
sockaddr_storage_clear(loopback);
- sockaddr_storage_ipv4_aton(loopback, "127.0.0.1");
-+ sockaddr_storage_ipv4_aton(loopback, "0.0.0.0"); //should it be configurable ?
++ sockaddr_storage_ipv4_aton(loopback, "0.0.0.0");
uint16_t port = sockaddr_storage_port(mOwnState.localaddr);
sockaddr_storage_ipv4_setport(loopback, port);
diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc
-index d4b5fe3..372d4c8 100644
+index 113489cd6..853067759 100644
--- a/libretroshare/src/rsserver/p3peers.cc
+++ b/libretroshare/src/rsserver/p3peers.cc
@@ -311,9 +311,9 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d)
@@ -68,10 +59,10 @@ index d4b5fe3..372d4c8 100644
}
else
diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc
-index 0f8a707..b6bc725 100644
+index 7593fc590..9e231ec7c 100644
--- a/libretroshare/src/rsserver/rsinit.cc
+++ b/libretroshare/src/rsserver/rsinit.cc
-@@ -112,7 +112,7 @@ class RsInitConfig
+@@ -117,7 +117,7 @@ class RsInitConfig
/* Listening Port */
bool forceExtPort;
@@ -80,7 +71,7 @@ index 0f8a707..b6bc725 100644
unsigned short port;
std::string inet ;
-@@ -170,12 +170,12 @@ void RsInit::InitRsConfig()
+@@ -178,7 +178,7 @@ void RsInit::InitRsConfig()
rsInitConfig->load_trustedpeer = false;
rsInitConfig->port = 0 ;
@@ -89,22 +80,16 @@ index 0f8a707..b6bc725 100644
rsInitConfig->haveLogFile = false;
rsInitConfig->outStderr = false;
rsInitConfig->forceExtPort = false;
-
-- rsInitConfig->inet = std::string("127.0.0.1");
-+ rsInitConfig->inet = std::string("0.0.0.0");
-
- rsInitConfig->autoLogin = false; // .
- rsInitConfig->startMinimised = false;
-@@ -376,7 +376,7 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
- if(rsInitConfig->autoLogin) rsInitConfig->startMinimised = true ;
- if(rsInitConfig->outStderr) rsInitConfig->haveLogFile = false ;
- if(!rsInitConfig->logfname.empty()) rsInitConfig->haveLogFile = true;
-- if(rsInitConfig->inet != "127.0.0.1") rsInitConfig->forceLocalAddr = true;
-+// if(rsInitConfig->inet != "127.0.0.1") rsInitConfig->forceLocalAddr = true; //wtf ?
+@@ -385,7 +385,7 @@ int RsInit::InitRetroShare(int _argc, char **_argv, bool /* strictCheck */)
+ if(rsInitConfig->autoLogin) rsInitConfig->startMinimised = true ;
+ if(rsInitConfig->outStderr) rsInitConfig->haveLogFile = false ;
+ if(!rsInitConfig->logfname.empty()) rsInitConfig->haveLogFile = true;
+- if(rsInitConfig->inet != "127.0.0.1") rsInitConfig->forceLocalAddr = true;
++// if(rsInitConfig->inet != "127.0.0.1") rsInitConfig->forceLocalAddr = true;
#ifdef LOCALNET_TESTING
- if(!portRestrictions.empty()) doPortRestrictions = true;
+ if(!portRestrictions.empty()) doPortRestrictions = true;
#endif
-@@ -1687,23 +1687,23 @@ int RsServer::StartupRetroShare()
+@@ -1667,23 +1667,23 @@ int RsServer::StartupRetroShare()
/**************************************************************************/
std::cerr << "Force Any Configuration before Startup (After Load)" << std::endl;
@@ -133,7 +118,7 @@ index 0f8a707..b6bc725 100644
+// sockaddr_storage_clear(laddr);
+//
+// struct sockaddr_in *lap = (struct sockaddr_in *) &laddr;
-+//
++//
+// lap->sin_family = AF_INET;
+// lap->sin_port = htons(rsInitConfig->port);
+//