]> Pileus Git - ~andy/linux/blobdiff - net/core/skbuff.c
v4 GRE: Add TCP segmentation offload for GRE
[~andy/linux] / net / core / skbuff.c
index 6c1ad09f8796db3f2a211c3cf777f8e24cab4874..2a3ca33c30aabd28569616824dd12c837b68faa4 100644 (file)
@@ -2738,6 +2738,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features)
        unsigned int mss = skb_shinfo(skb)->gso_size;
        unsigned int doffset = skb->data - skb_mac_header(skb);
        unsigned int offset = doffset;
+       unsigned int tnl_hlen = skb_tnl_header_len(skb);
        unsigned int headroom;
        unsigned int len;
        int sg = !!(features & NETIF_F_SG);
@@ -2814,7 +2815,10 @@ struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features)
                skb_set_network_header(nskb, skb->mac_len);
                nskb->transport_header = (nskb->network_header +
                                          skb_network_header_len(skb));
-               skb_copy_from_linear_data(skb, nskb->data, doffset);
+
+               skb_copy_from_linear_data_offset(skb, -tnl_hlen,
+                                                nskb->data - tnl_hlen,
+                                                doffset + tnl_hlen);
 
                if (fskb != skb_shinfo(skb)->frag_list)
                        continue;