From 33e2fc62012978a10a3a7f7f27c33eb2115b884b Mon Sep 17 00:00:00 2001 From: eihrul Date: Mon, 30 May 2011 19:00:26 +0000 Subject: [PATCH] check received port --- protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol.c b/protocol.c index 2237ba8..9791839 100644 --- a/protocol.c +++ b/protocol.c @@ -852,7 +852,8 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event) if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE || - (host -> receivedAddress.host != peer -> address.host && + ((host -> receivedAddress.host != peer -> address.host || + host -> receivedAddress.port != peer -> address.port) && peer -> address.host != ENET_HOST_BROADCAST) || (peer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID && sessionID != peer -> incomingSessionID))