From 20c28f78ce08fb1c89c5498cd1b9263c1d75e877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Wed, 1 May 2024 13:34:15 +0200 Subject: [PATCH] Remove unnecessary check excluding packets from wrong server This is already checked for all connection-oriented packets when feeding the connection in https://github.com/ddnet/ddnet/blob/952d3f6631cc0a1e6902ebf79b1cacca1e19ac72/src/engine/shared/network_conn.cpp#L260-L266 Closes #8285. --- src/engine/client/client.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 17dc00679..1e19546d9 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1301,12 +1301,6 @@ static CServerCapabilities GetServerCapabilities(int Version, int Flags) void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy) { - // only allow packets from the server we actually want - if(net_addr_comp(&pPacket->m_Address, &ServerAddress())) - { - return; - } - CUnpacker Unpacker; Unpacker.Reset(pPacket->m_pData, pPacket->m_DataSize); CMsgPacker Packer(NETMSG_EX, true);