|
@ -159,13 +159,13 @@ bool Session::interpret(RLP const& _r) |
|
|
bi::address_v4 peerAddress(_r[i][0].toHash<FixedHash<4>>().asArray()); |
|
|
bi::address_v4 peerAddress(_r[i][0].toHash<FixedHash<4>>().asArray()); |
|
|
auto ep = bi::tcp::endpoint(peerAddress, _r[i][1].toInt<short>()); |
|
|
auto ep = bi::tcp::endpoint(peerAddress, _r[i][1].toInt<short>()); |
|
|
h512 id = _r[i][2].toHash<h512>(); |
|
|
h512 id = _r[i][2].toHash<h512>(); |
|
|
clogS(NetAllDetail) << "Checking: " << ep << "(" << id.abridged() << ")"; |
|
|
clogS(NetAllDetail) << "Checking: " << ep << "(" << id.abridged() << ")" << isPrivateAddress(peerAddress) << m_id.abridged() << id.abridged() << isPrivateAddress(endpoint().address()) << m_server->m_incomingPeers.count(id) << id << m_server->m_incomingPeers.count(id); |
|
|
|
|
|
|
|
|
if (isPrivateAddress(peerAddress) && !m_server->m_netPrefs.localNetworking) |
|
|
if (isPrivateAddress(peerAddress) && !m_server->m_netPrefs.localNetworking) |
|
|
goto CONTINUE; |
|
|
goto CONTINUE; |
|
|
|
|
|
|
|
|
// check that it's not us or one we already know:
|
|
|
// check that it's not us or one we already know:
|
|
|
if (id && (m_server->m_id == id || (m_id == id && isPrivateAddress(endpoint().address())) || m_server->m_incomingPeers.count(id))) |
|
|
if (!(m_id == id && isPrivateAddress(endpoint().address()) && (!m_server->m_incomingPeers.count(id) || isPrivateAddress(m_server->m_incomingPeers.at(id).first.address()))) && (!id || m_server->m_id == id || m_server->m_incomingPeers.count(id))) |
|
|
goto CONTINUE; |
|
|
goto CONTINUE; |
|
|
|
|
|
|
|
|
// check that we're not already connected to addr:
|
|
|
// check that we're not already connected to addr:
|
|
|