(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:
@@ -119,7 +119,7 @@ void NetworkUDPReceive(SOCKET udp)
|
||||
p.next = NULL;
|
||||
|
||||
/* Handle the packet */
|
||||
NetworkHandleUDPPacket(&p, &client_addr);
|
||||
NetworkHandleUDPPacket(udp, &p, &client_addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 **////
|
||||
|
Reference in New Issue
Block a user