mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +00:00
P2PServer: ignore protocol versions higher than supported
This commit is contained in:
parent
5b245e64d3
commit
6ffe1d81c2
1 changed files with 1 additions and 1 deletions
|
@ -2317,7 +2317,7 @@ void P2PServer::P2PClient::on_peer_list_response(const uint8_t* buf)
|
|||
|
||||
// Check for protocol version message
|
||||
if ((*reinterpret_cast<uint32_t*>(ip.data + 12) == 0xFFFFFFFFU) && (port == 0xFFFF)) {
|
||||
m_protocolVersion = *reinterpret_cast<uint32_t*>(ip.data);
|
||||
m_protocolVersion = std::min(*reinterpret_cast<uint32_t*>(ip.data), SUPPORTED_PROTOCOL_VERSION);
|
||||
m_SoftwareVersion = *reinterpret_cast<uint32_t*>(ip.data + 4);
|
||||
m_SoftwareID = *reinterpret_cast<uint32_t*>(ip.data + 8);
|
||||
LOGINFO(5, "peer " << log::Gray() << static_cast<char*>(m_addrString) << log::NoColor()
|
||||
|
|
Loading…
Reference in a new issue