aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-03-29 02:39:18 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-29 02:39:18 -0400
commit2f181855a0b3c2b39314944add7b41c15647cf86 (patch)
tree45ba541fa37011adade32e48fcdb6b69d0621602
parent4b21cd4eedff2123712c2132c8c6264d40332465 (diff)
gso: Fix support for linear packets
When GRO/frag_list support was added to GSO, I made an error which broke the support for segmenting linear GSO packets (GSO packets are normally non-linear in the payload). These days most of these packets are constructed by the tun driver, which prefers to allocate linear memory if possible. This is fixed in the latest kernel, but for 2.6.29 and earlier it is still the norm. Therefore this bug causes failures with GSO when used with tun in 2.6.29. Reported-by: James Huang <jamesclhuang@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/skbuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 6acbf9e79eb1..ce6356cd9f71 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2579,7 +2579,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
2579 skb_network_header_len(skb)); 2579 skb_network_header_len(skb));
2580 skb_copy_from_linear_data(skb, nskb->data, doffset); 2580 skb_copy_from_linear_data(skb, nskb->data, doffset);
2581 2581
2582 if (pos >= offset + len) 2582 if (fskb != skb_shinfo(skb)->frag_list)
2583 continue; 2583 continue;
2584 2584
2585 if (!sg) { 2585 if (!sg) {