diff options
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 3943c3ad9145..0583e8498f13 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -415,9 +415,11 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | |||
415 | C(csum); | 415 | C(csum); |
416 | C(local_df); | 416 | C(local_df); |
417 | n->cloned = 1; | 417 | n->cloned = 1; |
418 | n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len; | ||
418 | n->nohdr = 0; | 419 | n->nohdr = 0; |
419 | C(pkt_type); | 420 | C(pkt_type); |
420 | C(ip_summed); | 421 | C(ip_summed); |
422 | skb_copy_queue_mapping(n, skb); | ||
421 | C(priority); | 423 | C(priority); |
422 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) | 424 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) |
423 | C(ipvs_property); | 425 | C(ipvs_property); |
@@ -426,6 +428,10 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | |||
426 | n->destructor = NULL; | 428 | n->destructor = NULL; |
427 | C(mark); | 429 | C(mark); |
428 | __nf_copy(n, skb); | 430 | __nf_copy(n, skb); |
431 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | ||
432 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | ||
433 | C(nf_trace); | ||
434 | #endif | ||
429 | #ifdef CONFIG_NET_SCHED | 435 | #ifdef CONFIG_NET_SCHED |
430 | C(tc_index); | 436 | C(tc_index); |
431 | #ifdef CONFIG_NET_CLS_ACT | 437 | #ifdef CONFIG_NET_CLS_ACT |
@@ -459,6 +465,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
459 | #endif | 465 | #endif |
460 | new->sk = NULL; | 466 | new->sk = NULL; |
461 | new->dev = old->dev; | 467 | new->dev = old->dev; |
468 | skb_copy_queue_mapping(new, old); | ||
462 | new->priority = old->priority; | 469 | new->priority = old->priority; |
463 | new->protocol = old->protocol; | 470 | new->protocol = old->protocol; |
464 | new->dst = dst_clone(old->dst); | 471 | new->dst = dst_clone(old->dst); |
@@ -482,6 +489,10 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old) | |||
482 | new->destructor = NULL; | 489 | new->destructor = NULL; |
483 | new->mark = old->mark; | 490 | new->mark = old->mark; |
484 | __nf_copy(new, old); | 491 | __nf_copy(new, old); |
492 | #if defined(CONFIG_NETFILTER_XT_TARGET_TRACE) || \ | ||
493 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | ||
494 | new->nf_trace = old->nf_trace; | ||
495 | #endif | ||
485 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) | 496 | #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE) |
486 | new->ipvs_property = old->ipvs_property; | 497 | new->ipvs_property = old->ipvs_property; |
487 | #endif | 498 | #endif |
@@ -676,6 +687,7 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, | |||
676 | skb->network_header += off; | 687 | skb->network_header += off; |
677 | skb->mac_header += off; | 688 | skb->mac_header += off; |
678 | skb->cloned = 0; | 689 | skb->cloned = 0; |
690 | skb->hdr_len = 0; | ||
679 | skb->nohdr = 0; | 691 | skb->nohdr = 0; |
680 | atomic_set(&skb_shinfo(skb)->dataref, 1); | 692 | atomic_set(&skb_shinfo(skb)->dataref, 1); |
681 | return 0; | 693 | return 0; |
@@ -1930,6 +1942,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
1930 | tail = nskb; | 1942 | tail = nskb; |
1931 | 1943 | ||
1932 | nskb->dev = skb->dev; | 1944 | nskb->dev = skb->dev; |
1945 | skb_copy_queue_mapping(nskb, skb); | ||
1933 | nskb->priority = skb->priority; | 1946 | nskb->priority = skb->priority; |
1934 | nskb->protocol = skb->protocol; | 1947 | nskb->protocol = skb->protocol; |
1935 | nskb->dst = dst_clone(skb->dst); | 1948 | nskb->dst = dst_clone(skb->dst); |