|
@ -382,7 +382,7 @@ void NodeTable::onReceived(UDPSocketFace*, bi::udp::endpoint const& _from, bytes |
|
|
// h256 + Signature + type + RLP (smallest possible packet is empty neighbours packet which is 3 bytes)
|
|
|
// h256 + Signature + type + RLP (smallest possible packet is empty neighbours packet which is 3 bytes)
|
|
|
if (_packet.size() < h256::size + Signature::size + 1 + 3) |
|
|
if (_packet.size() < h256::size + Signature::size + 1 + 3) |
|
|
{ |
|
|
{ |
|
|
clog(NodeTableWarn) << "Invalid message size from " << _from.address().to_string() << ":" << _from.port(); |
|
|
clog(NodeTableTriviaSummary) << "Invalid message size from " << _from.address().to_string() << ":" << _from.port(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -390,7 +390,7 @@ void NodeTable::onReceived(UDPSocketFace*, bi::udp::endpoint const& _from, bytes |
|
|
h256 hashSigned(sha3(hashedBytes)); |
|
|
h256 hashSigned(sha3(hashedBytes)); |
|
|
if (!_packet.cropped(0, h256::size).contentsEqual(hashSigned.asBytes())) |
|
|
if (!_packet.cropped(0, h256::size).contentsEqual(hashSigned.asBytes())) |
|
|
{ |
|
|
{ |
|
|
clog(NodeTableWarn) << "Invalid message hash from " << _from.address().to_string() << ":" << _from.port(); |
|
|
clog(NodeTableTriviaSummary) << "Invalid message hash from " << _from.address().to_string() << ":" << _from.port(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -402,7 +402,7 @@ void NodeTable::onReceived(UDPSocketFace*, bi::udp::endpoint const& _from, bytes |
|
|
Public nodeid(dev::recover(*(Signature const*)sigBytes.data(), sha3(signedBytes))); |
|
|
Public nodeid(dev::recover(*(Signature const*)sigBytes.data(), sha3(signedBytes))); |
|
|
if (!nodeid) |
|
|
if (!nodeid) |
|
|
{ |
|
|
{ |
|
|
clog(NodeTableWarn) << "Invalid message signature from " << _from.address().to_string() << ":" << _from.port(); |
|
|
clog(NodeTableTriviaSummary) << "Invalid message signature from " << _from.address().to_string() << ":" << _from.port(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|