aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-04-27 08:44:29 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-27 08:44:29 -0400
commitedbd9e30306067c3a45c035eb95a6f49daaa2337 (patch)
tree00e8ce4bbb0b517cea71ff14165b2b1d944d22f3 /include
parent56ed4351c2604c221a82276f51e5dfd467921bf3 (diff)
gro: Fix handling of headers that extend over the tail
The skb_gro_* code fails to handle the case where a header starts in the linear area but ends in the frags area. Since the goal of skb_gro_* is to optimise the case of completely non-linear packets, we can simply bail out if we have anything in the linear area. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 31167451d08d..c9ef41916071 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1137,7 +1137,7 @@ static inline void skb_gro_reset_offset(struct sk_buff *skb)
1137 1137
1138static inline void *skb_gro_mac_header(struct sk_buff *skb) 1138static inline void *skb_gro_mac_header(struct sk_buff *skb)
1139{ 1139{
1140 return skb_mac_header(skb) < skb->data ? skb_mac_header(skb) : 1140 return skb_headlen(skb) ? skb_mac_header(skb) :
1141 page_address(skb_shinfo(skb)->frags[0].page) + 1141 page_address(skb_shinfo(skb)->frags[0].page) +
1142 skb_shinfo(skb)->frags[0].page_offset; 1142 skb_shinfo(skb)->frags[0].page_offset;
1143} 1143}