direct-io.hg

annotate 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
rev   line source
kfraser@10720 1 diff -urp a/net/ipv4/tcp.c b/net/ipv4/tcp.c
kfraser@10720 2 --- a/net/ipv4/tcp.c 2006-07-25 14:42:53.194910626 +0100
kfraser@10720 3 +++ b/net/ipv4/tcp.c 2006-07-25 14:41:00.955501910 +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;