patch-2.2.19 linux/net/ipv4/tcp_ipv4.c
Next file: linux/net/ipv4/udp.c
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Sun Mar 25 11:37:41 2001
- Orig file:
v2.2.18/net/ipv4/tcp_ipv4.c
- Orig date:
Sun Mar 25 11:28:40 2001
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
@@ -5,7 +5,7 @@
*
* Implementation of the Transmission Control Protocol(TCP).
*
- * Version: $Id: tcp_ipv4.c,v 1.175.2.17 2000/10/31 22:42:58 davem Exp $
+ * Version: $Id: tcp_ipv4.c,v 1.175.2.18 2001/02/02 01:27:08 davem Exp $
*
* IPv4 specific functions
*
@@ -1109,6 +1109,8 @@
struct tcphdr *th = (struct tcphdr *)(skb->nh.raw + iph->ihl*4);
struct sock *sk;
+ if (ntohs(iph->tot_len) - iph->ihl*4 < sizeof(struct tcphdr))
+ return 0;
sk = tcp_v4_lookup(iph->saddr, th->source, iph->daddr,
th->dest, skb->dev->ifindex);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)