diff options
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 669f5d97c6eb..eae228469627 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -503,7 +503,7 @@ int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) | |||
503 | frag->h.raw = frag->data; | 503 | frag->h.raw = frag->data; |
504 | __skb_push(frag, hlen); | 504 | __skb_push(frag, hlen); |
505 | skb_reset_network_header(frag); | 505 | skb_reset_network_header(frag); |
506 | memcpy(frag->nh.raw, iph, hlen); | 506 | memcpy(skb_network_header(frag), iph, hlen); |
507 | iph = frag->nh.iph; | 507 | iph = frag->nh.iph; |
508 | iph->tot_len = htons(frag->len); | 508 | iph->tot_len = htons(frag->len); |
509 | ip_copy_metadata(frag, skb); | 509 | ip_copy_metadata(frag, skb); |
@@ -607,7 +607,7 @@ slow_path: | |||
607 | * Copy the packet header into the new buffer. | 607 | * Copy the packet header into the new buffer. |
608 | */ | 608 | */ |
609 | 609 | ||
610 | memcpy(skb2->nh.raw, skb->data, hlen); | 610 | memcpy(skb_network_header(skb2), skb->data, hlen); |
611 | 611 | ||
612 | /* | 612 | /* |
613 | * Copy a block of the IP datagram. | 613 | * Copy a block of the IP datagram. |
@@ -1198,7 +1198,7 @@ int ip_push_pending_frames(struct sock *sk) | |||
1198 | tail_skb = &(skb_shinfo(skb)->frag_list); | 1198 | tail_skb = &(skb_shinfo(skb)->frag_list); |
1199 | 1199 | ||
1200 | /* move skb->data to ip header from ext header */ | 1200 | /* move skb->data to ip header from ext header */ |
1201 | if (skb->data < skb->nh.raw) | 1201 | if (skb->data < skb_network_header(skb)) |
1202 | __skb_pull(skb, skb_network_offset(skb)); | 1202 | __skb_pull(skb, skb_network_offset(skb)); |
1203 | while ((tmp_skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) { | 1203 | while ((tmp_skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) { |
1204 | __skb_pull(tmp_skb, skb->h.raw - skb->nh.raw); | 1204 | __skb_pull(tmp_skb, skb->h.raw - skb->nh.raw); |