diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-05-30 02:45:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-31 20:06:07 -0400 |
commit | 1e2bd517c108816220f262d7954b697af03b5f9c (patch) | |
tree | 28fd8bea22513b7fcf8caa1a644f075f13ec5f48 /include | |
parent | b190a50875b95e58ebe2b00ed3bf7f1d44961471 (diff) |
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.h | 15 |
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) | |||
2852 | SKB_GSO_CB(inner_skb)->mac_offset; | 2852 | SKB_GSO_CB(inner_skb)->mac_offset; |
2853 | } | 2853 | } |
2854 | 2854 | ||
2855 | static inline int gso_pskb_expand_head(struct sk_buff *skb, int extra) | ||
2856 | { | ||
2857 | int new_headroom, headroom; | ||
2858 | int ret; | ||
2859 | |||
2860 | headroom = skb_headroom(skb); | ||
2861 | ret = pskb_expand_head(skb, extra, 0, GFP_ATOMIC); | ||
2862 | if (ret) | ||
2863 | return ret; | ||
2864 | |||
2865 | new_headroom = skb_headroom(skb); | ||
2866 | SKB_GSO_CB(skb)->mac_offset += (new_headroom - headroom); | ||
2867 | return 0; | ||
2868 | } | ||
2869 | |||
2855 | static inline bool skb_is_gso(const struct sk_buff *skb) | 2870 | static inline bool skb_is_gso(const struct sk_buff *skb) |
2856 | { | 2871 | { |
2857 | return skb_shinfo(skb)->gso_size; | 2872 | return skb_shinfo(skb)->gso_size; |