From 47c158bbc5ee1d6ea1475c58f08f4564054d5416 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 31 Jan 2007 12:47:35 +0000 Subject: [PATCH] (svn r8490) [0.5] -Add: logging of the IP address and port of invalid/illegal UDP packets. --- network_udp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/network_udp.c b/network_udp.c index be8078e564..bba5cc1770 100644 --- a/network_udp.c +++ b/network_udp.c @@ -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)); } } }