UDP short packet patch for ipv4
Subsystems (2)
PATCH 1/1 UDP short packet patch for ipv4
This patch changes printk to add helpful information...i.e. who to firewall etc. It is against 2.4.18-rc1. IPV6 needs one too but in my opinion, a similar NIPQUAD macro needs built and the IPV6 core in general needs a tidying up to use the new macro.
net/ipv4/udp.c Thu Feb 14 13:32:34 2002 renamed from net/ipv4/udp.c.orig Thu Feb 14 13:38:24 2002 +0 -0
@@ -928,7 +928,14 @@ return(0);
short_packet:
- NETDEBUG(if (net_ratelimit()) printk(KERN_DEBUG "UDP: short packet: %d/%d\n", ulen, len));
+ NETDEBUG(if (net_ratelimit())
+ printk(KERN_DEBUG "UDP: short packet: %u.%u.%u.%u:%u %d/%d to %u.%u.%u.%u:%u\n",
+ NIPQUAD(saddr),
+ ntohs(uh->source),
+ ulen,
+ len,
+ NIPQUAD(daddr),
+ ntohs(uh->dest)));
no_header:
UDP_INC_STATS_BH(UdpInErrors);
kfree_skb(skb);