mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Tweaked linkmgr to allow loopback connections.
This allows STD -> HIDDEN connections! git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7037 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d39c5c028a
commit
6526dd6c4b
@ -1709,7 +1709,7 @@ bool p3LinkMgrIMPL::locked_CheckPotentialAddr(const struct sockaddr_storage &ad
|
||||
}
|
||||
|
||||
bool isValid = sockaddr_storage_isValidNet(addr);
|
||||
// bool isLoopback = sockaddr_storage_isLoopbackNet(addr);
|
||||
bool isLoopback = sockaddr_storage_isLoopbackNet(addr);
|
||||
// bool isPrivate = sockaddr_storage_isPrivateNet(addr);
|
||||
bool isExternal = sockaddr_storage_isExternalNet(addr);
|
||||
|
||||
@ -1753,6 +1753,18 @@ bool p3LinkMgrIMPL::locked_CheckPotentialAddr(const struct sockaddr_storage &ad
|
||||
}
|
||||
|
||||
|
||||
/* if loopback, then okay - probably proxy connection (or local testing).
|
||||
*/
|
||||
if (isLoopback)
|
||||
{
|
||||
#ifdef LINKMGR_DEBUG
|
||||
std::cerr << "p3LinkMgrIMPL::locked_CheckPotentialAddr() ACCEPTING - LOOPBACK";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* get here, it is private or loopback
|
||||
* - can only connect to these addresses if we are on the same subnet.
|
||||
- check net against our local address.
|
||||
|
@ -76,7 +76,8 @@ pqiperson * pqisslpersongrp::locked_createPerson(std::string id, pqilistener *li
|
||||
pqiperson *pqip = new pqiperson(id, this);
|
||||
|
||||
// If using proxy, then only create a proxy item, otherwise can use any.
|
||||
if (mPeerMgr->isHiddenPeer(id))
|
||||
// If we are a hidden node - then all connections should be via proxy.
|
||||
if (mPeerMgr->isHiddenPeer(id) || mPeerMgr->isHidden())
|
||||
{
|
||||
std::cerr << "pqisslpersongrp::locked_createPerson() Is Hidden Peer!";
|
||||
std::cerr << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user