diff --git a/libethcore/CommonEth.cpp b/libethcore/CommonEth.cpp index 1526da1b0..40a86dba4 100644 --- a/libethcore/CommonEth.cpp +++ b/libethcore/CommonEth.cpp @@ -34,8 +34,8 @@ namespace dev namespace eth { -const unsigned c_protocolVersion = 34; -const unsigned c_databaseVersion = 2; +const unsigned c_protocolVersion = 35; +const unsigned c_databaseVersion = 3; static const vector> g_units = { diff --git a/libp2p/Session.cpp b/libp2p/Session.cpp index 119881c24..a144d398f 100644 --- a/libp2p/Session.cpp +++ b/libp2p/Session.cpp @@ -44,7 +44,7 @@ Session::Session(Host* _s, bi::tcp::socket _socket, bi::tcp::endpoint const& _ma { m_lastReceived = m_connect = std::chrono::steady_clock::now(); - m_info = PeerInfo({NodeId(), "?", m_manualEndpoint.address().to_string(), m_manualEndpoint.port(), std::chrono::steady_clock::duration(0), CapDescSet(), 0, map()}); + m_info = PeerInfo({NodeId(), "?", m_manualEndpoint.address().to_string(), 0, std::chrono::steady_clock::duration(0), CapDescSet(), 0, map()}); } Session::Session(Host* _s, bi::tcp::socket _socket, std::shared_ptr const& _n, bool _force): @@ -317,7 +317,7 @@ bool Session::interpret(RLP const& _r) // See if it's any better that ours or not... // This could be the public address of a known node. // SECURITY: remove this in beta - it's only for lazy connections and presents an easy attack vector. - if (m_server->m_nodes.count(id) && isPrivateAddress(m_server->m_nodes.at(id)->address.address())) + if (m_server->m_nodes.count(id) && isPrivateAddress(m_server->m_nodes.at(id)->address.address()) && ep.port() != 0) // Update address if the node if we now have a public IP for it. m_server->m_nodes[id]->address = ep; goto CONTINUE;