lkml.org 
[lkml]   [2002]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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.

--- linux/net/ipv4/udp.c.orig Thu Feb 14 13:38:24 2002
+++ linux/net/ipv4/udp.c Thu Feb 14 13:32:34 2002
@@ -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);
[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.040 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site