diff options
Diffstat (limited to 'patches/linux-2.6.18/net-gso-6-linear-segmentation.patch')
-rw-r--r-- | patches/linux-2.6.18/net-gso-6-linear-segmentation.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/linux-2.6.18/net-gso-6-linear-segmentation.patch b/patches/linux-2.6.18/net-gso-6-linear-segmentation.patch new file mode 100644 index 0000000000..ef30ef42fd --- /dev/null +++ b/patches/linux-2.6.18/net-gso-6-linear-segmentation.patch @@ -0,0 +1,27 @@ +diff -pruN ../orig-linux-2.6.18/net/core/skbuff.c ./net/core/skbuff.c +--- ../orig-linux-2.6.18/net/core/skbuff.c 2006-09-20 04:42:06.000000000 +0100 ++++ ./net/core/skbuff.c 2007-01-12 18:10:37.000000000 +0000 +@@ -1945,7 +1945,7 @@ struct sk_buff *skb_segment(struct sk_bu + do { + struct sk_buff *nskb; + skb_frag_t *frag; +- int hsize, nsize; ++ int hsize; + int k; + int size; + +@@ -1956,11 +1956,10 @@ struct sk_buff *skb_segment(struct sk_bu + hsize = skb_headlen(skb) - offset; + if (hsize < 0) + hsize = 0; +- nsize = hsize + doffset; +- if (nsize > len + doffset || !sg) +- nsize = len + doffset; ++ if (hsize > len || !sg) ++ hsize = len; + +- nskb = alloc_skb(nsize + headroom, GFP_ATOMIC); ++ nskb = alloc_skb(hsize + doffset + headroom, GFP_ATOMIC); + if (unlikely(!nskb)) + goto err; + |