aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 4e0c92274189..ca1ccdf1ef76 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -485,6 +485,9 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb)
485 C(head); 485 C(head);
486 C(data); 486 C(data);
487 C(truesize); 487 C(truesize);
488#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
489 C(do_not_encrypt);
490#endif
488 atomic_set(&n->users, 1); 491 atomic_set(&n->users, 1);
489 492
490 atomic_inc(&(skb_shinfo(skb)->dataref)); 493 atomic_inc(&(skb_shinfo(skb)->dataref));
@@ -2253,14 +2256,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
2253 segs = nskb; 2256 segs = nskb;
2254 tail = nskb; 2257 tail = nskb;
2255 2258
2256 nskb->dev = skb->dev; 2259 __copy_skb_header(nskb, skb);
2257 skb_copy_queue_mapping(nskb, skb);
2258 nskb->priority = skb->priority;
2259 nskb->protocol = skb->protocol;
2260 nskb->vlan_tci = skb->vlan_tci;
2261 nskb->dst = dst_clone(skb->dst);
2262 memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
2263 nskb->pkt_type = skb->pkt_type;
2264 nskb->mac_len = skb->mac_len; 2260 nskb->mac_len = skb->mac_len;
2265 2261
2266 skb_reserve(nskb, headroom); 2262 skb_reserve(nskb, headroom);
@@ -2271,6 +2267,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
2271 skb_copy_from_linear_data(skb, skb_put(nskb, doffset), 2267 skb_copy_from_linear_data(skb, skb_put(nskb, doffset),
2272 doffset); 2268 doffset);
2273 if (!sg) { 2269 if (!sg) {
2270 nskb->ip_summed = CHECKSUM_NONE;
2274 nskb->csum = skb_copy_and_csum_bits(skb, offset, 2271 nskb->csum = skb_copy_and_csum_bits(skb, offset,
2275 skb_put(nskb, len), 2272 skb_put(nskb, len),
2276 len, 0); 2273 len, 0);
@@ -2280,8 +2277,6 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
2280 frag = skb_shinfo(nskb)->frags; 2277 frag = skb_shinfo(nskb)->frags;
2281 k = 0; 2278 k = 0;
2282 2279
2283 nskb->ip_summed = CHECKSUM_PARTIAL;
2284 nskb->csum = skb->csum;
2285 skb_copy_from_linear_data_offset(skb, offset, 2280 skb_copy_from_linear_data_offset(skb, offset,
2286 skb_put(nskb, hsize), hsize); 2281 skb_put(nskb, hsize), hsize);
2287 2282