ia64/xen-unstable

annotate patches/linux-2.6.16.13/net-gso-1-check-dodgy.patch @ 11154:bb37d167c82e

[XEND] xc_save/xc_restore open the libxc interface independently
of their parent. This is required now that the interface fd is
marked for close-on-exec.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Aug 15 19:04:43 2006 +0100 (2006-08-15)
parents d48322cddd87
children
rev   line source
kfraser@10779 1 diff -urp a/net/ipv4/tcp.c b/net/ipv4/tcp.c
kfraser@10779 2 --- a/net/ipv4/tcp.c 2006-07-25 14:42:53.194910626 +0100
kfraser@10779 3 +++ b/net/ipv4/tcp.c 2006-07-25 14:41:00.955501910 +0100
kfraser@10779 4 @@ -2042,13 +2042,19 @@ struct sk_buff *tcp_tso_segment(struct s
kfraser@10779 5 if (!pskb_may_pull(skb, thlen))
kfraser@10779 6 goto out;
kfraser@10779 7
kfraser@10779 8 - segs = NULL;
kfraser@10779 9 - if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
kfraser@10779 10 - goto out;
kfraser@10779 11 -
kfraser@10779 12 oldlen = (u16)~skb->len;
kfraser@10779 13 __skb_pull(skb, thlen);
kfraser@10779 14
kfraser@10779 15 + if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
kfraser@10779 16 + /* Packet is from an untrusted source, reset gso_segs. */
kfraser@10779 17 + int mss = skb_shinfo(skb)->gso_size;
kfraser@10779 18 +
kfraser@10779 19 + skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
kfraser@10779 20 +
kfraser@10779 21 + segs = NULL;
kfraser@10779 22 + goto out;
kfraser@10779 23 + }
kfraser@10779 24 +
kfraser@10779 25 segs = skb_segment(skb, features);
kfraser@10779 26 if (IS_ERR(segs))
kfraser@10779 27 goto out;