direct-io.hg

diff patches/linux-2.6.16.13/net-gso-1-check-dodgy.patch @ 10720:d48322cddd87

Split networking GSO patch into base portion plus additions.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Jul 25 15:06:39 2006 +0100 (2006-07-25)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/linux-2.6.16.13/net-gso-1-check-dodgy.patch	Tue Jul 25 15:06:39 2006 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +diff -urp a/net/ipv4/tcp.c b/net/ipv4/tcp.c
     1.5 +--- a/net/ipv4/tcp.c	2006-07-25 14:42:53.194910626 +0100
     1.6 ++++ b/net/ipv4/tcp.c	2006-07-25 14:41:00.955501910 +0100
     1.7 +@@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s
     1.8 + 	if (!pskb_may_pull(skb, thlen))
     1.9 + 		goto out;
    1.10 + 
    1.11 +-	segs = NULL;
    1.12 +-	if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
    1.13 +-		goto out;
    1.14 +-
    1.15 + 	oldlen = (u16)~skb->len;
    1.16 + 	__skb_pull(skb, thlen);
    1.17 + 
    1.18 ++	if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
    1.19 ++		/* Packet is from an untrusted source, reset gso_segs. */
    1.20 ++		int mss = skb_shinfo(skb)->gso_size;
    1.21 ++
    1.22 ++		skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
    1.23 ++
    1.24 ++		segs = NULL;
    1.25 ++		goto out;
    1.26 ++	}
    1.27 ++
    1.28 + 	segs = skb_segment(skb, features);
    1.29 + 	if (IS_ERR(segs))
    1.30 + 		goto out;