summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-05-30 06:45:27 +0000
committerDavid S. Miller <davem@davemloft.net>2013-05-31 17:06:07 -0700
commit1e2bd517c108816220f262d7954b697af03b5f9c (patch)
tree28fd8bea22513b7fcf8caa1a644f075f13ec5f48 /include
parentb190a50875b95e58ebe2b00ed3bf7f1d44961471 (diff)
downloadlinux-stable-1e2bd517c108816220f262d7954b697af03b5f9c.tar.gz
linux-stable-1e2bd517c108816220f262d7954b697af03b5f9c.tar.bz2
linux-stable-1e2bd517c108816220f262d7954b697af03b5f9c.zip
udp6: Fix udp fragmentation for tunnel traffic.
udp6 over GRE tunnel does not work after to GRE tso changes. GRE tso handler passes inner packet but keeps track of outer header start in SKB_GSO_CB(skb)->mac_offset. udp6 fragment need to take care of outer header, which start at the mac_offset, while adding fragment header. This bug is introduced by commit 68c3316311 (GRE: Add TCP segmentation offload for GRE). Reported-by: Dmitry Kravkov <dkravkov@gmail.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Tested-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 2e0ced1af3b1..9c676eae3968 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2852,6 +2852,21 @@ static inline int skb_tnl_header_len(const struct sk_buff *inner_skb)
SKB_GSO_CB(inner_skb)->mac_offset;
}
+static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra)
+{
+ int new_headroom, headroom;
+ int ret;
+
+ headroom = skb_headroom(skb);
+ ret = pskb_expand_head(skb, extra, 0, GFP_ATOMIC);
+ if (ret)
+ return ret;
+
+ new_headroom = skb_headroom(skb);
+ SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom);
+ return 0;
+}
+
static inline bool skb_is_gso(const struct sk_buff *skb)
{
return skb_shinfo(skb)->gso_size;