1
0
Fork 0

(svn r8490) [0.5] -Add: logging of the IP address and port of invalid/illegal UDP packets.

release/0.5
rubidium 2007-01-31 12:47:35 +00:00
parent 4e1c7b8197
commit 47c158bbc5
1 changed files with 4 additions and 2 deletions

View File

@ -538,9 +538,11 @@ static void NetworkHandleUDPPacket(Packet* p, struct sockaddr_in* client_addr)
_network_udp_packet[type](p, client_addr);
} else {
if (!_udp_cs.has_quit) {
DEBUG(net, 0)("[NET][UDP] Received invalid packet type %d", type);
DEBUG(net, 0)("[NET][UDP] Received invalid packet type %d from %s:%d",
type, inet_ntoa(client_addr->sin_addr), ntohs(client_addr->sin_port));
} else {
DEBUG(net, 0)("[NET][UDP] Received illegal packet");
DEBUG(net, 0)("[NET][UDP] Received illegal packet from %s:%d",
inet_ntoa(client_addr->sin_addr), ntohs(client_addr->sin_port));
}
}
}