direct-io.hg

diff patches/linux-2.6.16.29/net-gso-1-check-dodgy.patch @ 11536:041be3f6b38e

[linux patches] Update patches for linux-2.6.16.29.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Tue Sep 19 14:26:47 2006 +0100 (2006-09-19)
parents patches/linux-2.6.16.13/net-gso-1-check-dodgy.patch@d48322cddd87
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/linux-2.6.16.29/net-gso-1-check-dodgy.patch	Tue Sep 19 14:26:47 2006 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp.c ./net/ipv4/tcp.c
     1.5 +--- ../orig-linux-2.6.16.29/net/ipv4/tcp.c	2006-09-19 13:59:20.000000000 +0100
     1.6 ++++ ./net/ipv4/tcp.c	2006-09-19 13:59:42.000000000 +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;