direct-io.hg

view patches/linux-2.6.16.13/net-gso-1-check-dodgy.patch @ 11329:3fdc31e91384

[IA64] Modify xc_ia64_hvm_build for using the new Xen event channels

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Wed Aug 23 13:21:02 2006 -0600 (2006-08-23)
parents d48322cddd87
children
line source
1 diff -urp a/net/ipv4/tcp.c b/net/ipv4/tcp.c
2 --- a/net/ipv4/tcp.c 2006-07-25 14:42:53.194910626 +0100
3 +++ b/net/ipv4/tcp.c 2006-07-25 14:41:00.955501910 +0100
4 @@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s
5 if (!pskb_may_pull(skb, thlen))
6 goto out;
8 - segs = NULL;
9 - if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
10 - goto out;
11 -
12 oldlen = (u16)~skb->len;
13 __skb_pull(skb, thlen);
15 + if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
16 + /* Packet is from an untrusted source, reset gso_segs. */
17 + int mss = skb_shinfo(skb)->gso_size;
18 +
19 + skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
20 +
21 + segs = NULL;
22 + goto out;
23 + }
24 +
25 segs = skb_segment(skb, features);
26 if (IS_ERR(segs))
27 goto out;