mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
Log protocol ver on mismatched client connect too
This commit is contained in:
parent
af0f7ac4a2
commit
a08251a61e
@ -112,7 +112,7 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
|
|||||||
|
|
||||||
if (depl_serial_v == SER_FMT_VER_INVALID) {
|
if (depl_serial_v == SER_FMT_VER_INVALID) {
|
||||||
actionstream << "Server: A mismatched client tried to connect from " <<
|
actionstream << "Server: A mismatched client tried to connect from " <<
|
||||||
addr_s << " client_max=" << (int)client_max << std::endl;
|
addr_s << " ser_fmt_max=" << (int)client_max << std::endl;
|
||||||
DenyAccess(peer_id, SERVER_ACCESSDENIED_WRONG_VERSION);
|
DenyAccess(peer_id, SERVER_ACCESSDENIED_WRONG_VERSION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
|
|||||||
net_proto_version < SERVER_PROTOCOL_VERSION_MIN ||
|
net_proto_version < SERVER_PROTOCOL_VERSION_MIN ||
|
||||||
net_proto_version > SERVER_PROTOCOL_VERSION_MAX) {
|
net_proto_version > SERVER_PROTOCOL_VERSION_MAX) {
|
||||||
actionstream << "Server: A mismatched client tried to connect from " <<
|
actionstream << "Server: A mismatched client tried to connect from " <<
|
||||||
addr_s << std::endl;
|
addr_s << " proto_max=" << (int)max_net_proto_version << std::endl;
|
||||||
DenyAccess(peer_id, SERVER_ACCESSDENIED_WRONG_VERSION);
|
DenyAccess(peer_id, SERVER_ACCESSDENIED_WRONG_VERSION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user