ia64/xen-unstable

view patches/linux-2.6.16.29/net-gso-1-check-dodgy.patch @ 11729:3e9fcbee3c09

[IA64] fix sparse tree build with p2m exposure disabled

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Wed Oct 04 22:13:06 2006 -0600 (2006-10-04)
parents 041be3f6b38e
children
line source
1 diff -pruN ../orig-linux-2.6.16.29/net/ipv4/tcp.c ./net/ipv4/tcp.c
2 --- ../orig-linux-2.6.16.29/net/ipv4/tcp.c 2006-09-19 13:59:20.000000000 +0100
3 +++ ./net/ipv4/tcp.c 2006-09-19 13:59:42.000000000 +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;