patch-2.0.26 linux/net/ipv4/udp.c

Next file: linux/net/unix/af_unix.c
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.25/linux/net/ipv4/udp.c linux/net/ipv4/udp.c
@@ -151,7 +151,7 @@
  */
 
 void udp_err(int type, int code, unsigned char *header, __u32 daddr,
-	__u32 saddr, struct inet_protocol *protocol)
+	__u32 saddr, struct inet_protocol *protocol, int len)
 {
 	struct udphdr *uh;
 	struct sock *sk;
@@ -159,6 +159,9 @@
 	/*
 	 *	Find the 8 bytes of post IP header ICMP included for us
 	 */  
+	 
+	if(len<sizeof(struct udphdr))
+		return;
 	
 	uh = (struct udphdr *)header;  
    

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov