direct-io.hg

annotate 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
rev   line source
Christian@11536 1 diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp.c ./net/ipv4/tcp.c
Christian@11536 2 --- ../orig-linux-2.6.16.29/net/ipv4/tcp.c 2006-09-19 13:59:20.000000000 +0100
Christian@11536 3 +++ ./net/ipv4/tcp.c 2006-09-19 13:59:42.000000000 +0100
kfraser@10720 4 @@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s
kfraser@10720 5 if (!pskb_may_pull(skb, thlen))
kfraser@10720 6 goto out;
kfraser@10720 7
kfraser@10720 8 - segs = NULL;
kfraser@10720 9 - if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
kfraser@10720 10 - goto out;
kfraser@10720 11 -
kfraser@10720 12 oldlen = (u16)~skb->len;
kfraser@10720 13 __skb_pull(skb, thlen);
kfraser@10720 14
kfraser@10720 15 + if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
kfraser@10720 16 + /* Packet is from an untrusted source, reset gso_segs. */
kfraser@10720 17 + int mss = skb_shinfo(skb)->gso_size;
kfraser@10720 18 +
kfraser@10720 19 + skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
kfraser@10720 20 +
kfraser@10720 21 + segs = NULL;
kfraser@10720 22 + goto out;
kfraser@10720 23 + }
kfraser@10720 24 +
kfraser@10720 25 segs = skb_segment(skb, features);
kfraser@10720 26 if (IS_ERR(segs))
kfraser@10720 27 goto out;