Corrected the 127.0.0.1 persistency bug

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1104 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2009-03-30 20:07:24 +00:00
parent 9b59f89cdf
commit 0cd24c8f21

View File

@ -2795,7 +2795,11 @@ bool p3ConnectMgr::checkNetAddress()
std::cerr << std::endl;
#endif
if ((*it) == inet_ntoa(ownState.localaddr.sin_addr))
// Ive added the 'isNotLoopbackNet' to prevent re-using the lo address if this was saved in the
// configuration. In such a case, lo should only be chosen from getPreferredInterface as a last resort
// fallback solution.
//
if ((!isLoopbackNet(&ownState.localaddr.sin_addr)) && (*it) == inet_ntoa(ownState.localaddr.sin_addr))
{
#ifdef CONN_DEBUG
std::cerr << "p3ConnectMgr::checkNetAddress() Matches Existing Address! FOUND = true";