direct-io.hg

view 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
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;