(svn r7821) -Fix: be more strict about the socket from where packets arrive. Do not accept requests about the game server on the master/client socket, do not accept master server acks on the client/server socket, etc.

This commit is contained in:
rubidium
2007-01-04 15:42:09 +00:00
parent bd37b23bd2
commit 81235fc16b
3 changed files with 32 additions and 28 deletions

View File

@@ -119,7 +119,7 @@ void NetworkUDPReceive(SOCKET udp)
p.next = NULL;
/* Handle the packet */
NetworkHandleUDPPacket(&p, &client_addr);
NetworkHandleUDPPacket(udp, &p, &client_addr);
}
}

View File

@@ -17,10 +17,11 @@ void NetworkUDPReceive(SOCKET udp);
/**
* Function that is called for every received UDP packet.
* @param udp the socket the packet is received on
* @param packet the received packet
* @param client_addr the address of the sender of the packet
*/
void NetworkHandleUDPPacket(Packet *p, struct sockaddr_in *client_addr);
void NetworkHandleUDPPacket(SOCKET udp, Packet *p, struct sockaddr_in *client_addr);
///** Sending/receiving of (large) chuncks of UDP packets **////