mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Require client to consistently use peer ID
This commit is contained in:
parent
f27f701251
commit
bdc124ba41
1 changed files with 7 additions and 0 deletions
|
@ -1018,6 +1018,13 @@ void ConnectionReceiveThread::receive(SharedBuffer<u8> &packetdata,
|
|||
peer->SetFullyOpen();
|
||||
// Setup phase has a fixed timeout
|
||||
peer->ResetTimeout();
|
||||
} else if (!peer->isHalfOpen()) {
|
||||
// If the peer talks to us without a peer ID when it has done so
|
||||
// before something is definitely fishy.
|
||||
LOG(derr_con << m_connection->getDesc()
|
||||
<< " Peer " << peer_id << " sending without peer id?!"
|
||||
" Ignoring." << std::endl);
|
||||
return;
|
||||
}
|
||||
|
||||
auto *udpPeer = dynamic_cast<UDPPeer *>(&peer);
|
||||
|
|
Loading…
Add table
Reference in a new issue