diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ah6.c | 8 | ||||
-rw-r--r-- | net/ipv6/exthdrs.c | 6 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 11 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 4 | ||||
-rw-r--r-- | net/ipv6/ipcomp6.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_LOG.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 4 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 8 | ||||
-rw-r--r-- | net/ipv6/sit.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_beet.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_transport.c | 4 | ||||
-rw-r--r-- | net/ipv6/xfrm6_mode_tunnel.c | 4 |
14 files changed, 33 insertions, 32 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index d2af4fe3725b..b696c8401200 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -316,8 +316,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
316 | * | 316 | * |
317 | * To erase AH: | 317 | * To erase AH: |
318 | * Keeping copy of cleared headers. After AH processing, | 318 | * Keeping copy of cleared headers. After AH processing, |
319 | * Moving the pointer of skb->nh.raw by using skb_pull as long as AH | 319 | * Moving the pointer of skb->network_header by using skb_pull as long |
320 | * header length. Then copy back the copy as long as hdr_len | 320 | * as AH header length. Then copy back the copy as long as hdr_len |
321 | * If destination header following AH exists, copy it into after [Ext2]. | 321 | * If destination header following AH exists, copy it into after [Ext2]. |
322 | * | 322 | * |
323 | * |<>|[IPv6][Ext1][Ext2][Dest][Payload] | 323 | * |<>|[IPv6][Ext1][Ext2][Dest][Payload] |
@@ -384,9 +384,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
384 | } | 384 | } |
385 | } | 385 | } |
386 | 386 | ||
387 | skb->nh.raw += ah_hlen; | 387 | skb->network_header += ah_hlen; |
388 | memcpy(skb_network_header(skb), tmp_hdr, hdr_len); | 388 | memcpy(skb_network_header(skb), tmp_hdr, hdr_len); |
389 | skb->h.raw = skb->nh.raw; | 389 | skb->transport_header = skb->network_header; |
390 | __skb_pull(skb, ah_hlen + hdr_len); | 390 | __skb_pull(skb, ah_hlen + hdr_len); |
391 | 391 | ||
392 | kfree(tmp_hdr); | 392 | kfree(tmp_hdr); |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index f34cc2bd489a..a6a275db88cd 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -306,7 +306,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp) | |||
306 | if (ip6_parse_tlv(tlvprocdestopt_lst, skbp)) { | 306 | if (ip6_parse_tlv(tlvprocdestopt_lst, skbp)) { |
307 | dst_release(dst); | 307 | dst_release(dst); |
308 | skb = *skbp; | 308 | skb = *skbp; |
309 | skb->h.raw += (skb_transport_header(skb)[1] + 1) << 3; | 309 | skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3; |
310 | opt = IP6CB(skb); | 310 | opt = IP6CB(skb); |
311 | #ifdef CONFIG_IPV6_MIP6 | 311 | #ifdef CONFIG_IPV6_MIP6 |
312 | opt->nhoff = dstbuf; | 312 | opt->nhoff = dstbuf; |
@@ -444,7 +444,7 @@ looped_back: | |||
444 | } | 444 | } |
445 | 445 | ||
446 | opt->lastopt = opt->srcrt = skb_network_header_len(skb); | 446 | opt->lastopt = opt->srcrt = skb_network_header_len(skb); |
447 | skb->h.raw += (hdr->hdrlen + 1) << 3; | 447 | skb->transport_header += (hdr->hdrlen + 1) << 3; |
448 | opt->dst0 = opt->dst1; | 448 | opt->dst0 = opt->dst1; |
449 | opt->dst1 = 0; | 449 | opt->dst1 = 0; |
450 | opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); | 450 | opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb); |
@@ -752,7 +752,7 @@ int ipv6_parse_hopopts(struct sk_buff **skbp) | |||
752 | opt->hop = sizeof(struct ipv6hdr); | 752 | opt->hop = sizeof(struct ipv6hdr); |
753 | if (ip6_parse_tlv(tlvprochopopt_lst, skbp)) { | 753 | if (ip6_parse_tlv(tlvprochopopt_lst, skbp)) { |
754 | skb = *skbp; | 754 | skb = *skbp; |
755 | skb->h.raw += (skb_transport_header(skb)[1] + 1) << 3; | 755 | skb->transport_header += (skb_transport_header(skb)[1] + 1) << 3; |
756 | opt = IP6CB(skb); | 756 | opt = IP6CB(skb); |
757 | opt->nhoff = sizeof(struct ipv6hdr); | 757 | opt->nhoff = sizeof(struct ipv6hdr); |
758 | return 1; | 758 | return 1; |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index cf0c4406b59e..be0ee8a34f9b 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -101,7 +101,7 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
101 | if (hdr->version != 6) | 101 | if (hdr->version != 6) |
102 | goto err; | 102 | goto err; |
103 | 103 | ||
104 | skb->h.raw = skb->nh.raw + sizeof(*hdr); | 104 | skb->transport_header = skb->network_header + sizeof(*hdr); |
105 | IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); | 105 | IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); |
106 | 106 | ||
107 | pkt_len = ntohs(hdr->payload_len); | 107 | pkt_len = ntohs(hdr->payload_len); |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 57a326080757..b2c092c6b9dc 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -733,7 +733,8 @@ slow_path: | |||
733 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); | 733 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); |
734 | skb_reset_network_header(frag); | 734 | skb_reset_network_header(frag); |
735 | fh = (struct frag_hdr *)(skb_network_header(frag) + hlen); | 735 | fh = (struct frag_hdr *)(skb_network_header(frag) + hlen); |
736 | frag->h.raw = frag->nh.raw + hlen + sizeof(struct frag_hdr); | 736 | frag->transport_header = (frag->network_header + hlen + |
737 | sizeof(struct frag_hdr)); | ||
737 | 738 | ||
738 | /* | 739 | /* |
739 | * Charge the memory for the fragment to any owner | 740 | * Charge the memory for the fragment to any owner |
@@ -761,7 +762,7 @@ slow_path: | |||
761 | /* | 762 | /* |
762 | * Copy a block of the IP datagram. | 763 | * Copy a block of the IP datagram. |
763 | */ | 764 | */ |
764 | if (skb_copy_bits(skb, ptr, frag->h.raw, len)) | 765 | if (skb_copy_bits(skb, ptr, skb_transport_header(skb), len)) |
765 | BUG(); | 766 | BUG(); |
766 | left -= len; | 767 | left -= len; |
767 | 768 | ||
@@ -976,7 +977,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
976 | skb_reset_network_header(skb); | 977 | skb_reset_network_header(skb); |
977 | 978 | ||
978 | /* initialize protocol header pointer */ | 979 | /* initialize protocol header pointer */ |
979 | skb->h.raw = skb->nh.raw + fragheaderlen; | 980 | skb->transport_header = skb->network_header + fragheaderlen; |
980 | 981 | ||
981 | skb->ip_summed = CHECKSUM_PARTIAL; | 982 | skb->ip_summed = CHECKSUM_PARTIAL; |
982 | skb->csum = 0; | 983 | skb->csum = 0; |
@@ -1198,8 +1199,8 @@ alloc_new_skb: | |||
1198 | data = skb_put(skb, fraglen); | 1199 | data = skb_put(skb, fraglen); |
1199 | skb_set_network_header(skb, exthdrlen); | 1200 | skb_set_network_header(skb, exthdrlen); |
1200 | data += fragheaderlen; | 1201 | data += fragheaderlen; |
1201 | skb->h.raw = skb->nh.raw + fragheaderlen; | 1202 | skb->transport_header = (skb->network_header + |
1202 | 1203 | fragheaderlen); | |
1203 | if (fraggap) { | 1204 | if (fraggap) { |
1204 | skb->csum = skb_copy_and_csum_bits( | 1205 | skb->csum = skb_copy_and_csum_bits( |
1205 | skb_prev, maxfraglen, | 1206 | skb_prev, maxfraglen, |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 05b59a77bc69..a0902fbdb4e1 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -701,7 +701,7 @@ static int ip6_tnl_rcv(struct sk_buff *skb, __u16 protocol, | |||
701 | goto discard; | 701 | goto discard; |
702 | } | 702 | } |
703 | secpath_reset(skb); | 703 | secpath_reset(skb); |
704 | skb->mac.raw = skb->nh.raw; | 704 | skb->mac_header = skb->network_header; |
705 | skb_reset_network_header(skb); | 705 | skb_reset_network_header(skb); |
706 | skb->protocol = htons(protocol); | 706 | skb->protocol = htons(protocol); |
707 | skb->pkt_type = PACKET_HOST; | 707 | skb->pkt_type = PACKET_HOST; |
@@ -898,7 +898,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
898 | dst_release(skb->dst); | 898 | dst_release(skb->dst); |
899 | skb->dst = dst_clone(dst); | 899 | skb->dst = dst_clone(dst); |
900 | 900 | ||
901 | skb->h.raw = skb->nh.raw; | 901 | skb->transport_header = skb->network_header; |
902 | 902 | ||
903 | proto = fl->proto; | 903 | proto = fl->proto; |
904 | if (encap_limit >= 0) { | 904 | if (encap_limit >= 0) { |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 5555c98dea03..7691a1b5caac 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -81,7 +81,7 @@ static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
81 | /* Remove ipcomp header and decompress original payload */ | 81 | /* Remove ipcomp header and decompress original payload */ |
82 | iph = ipv6_hdr(skb); | 82 | iph = ipv6_hdr(skb); |
83 | ipch = (void *)skb->data; | 83 | ipch = (void *)skb->data; |
84 | skb->h.raw = skb->nh.raw + sizeof(*ipch); | 84 | skb->transport_header = skb->network_header + sizeof(*ipch); |
85 | __skb_pull(skb, sizeof(*ipch)); | 85 | __skb_pull(skb, sizeof(*ipch)); |
86 | 86 | ||
87 | /* decompression */ | 87 | /* decompression */ |
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c index 54d176187f3f..b465e24e90b3 100644 --- a/net/ipv6/netfilter/ip6t_LOG.c +++ b/net/ipv6/netfilter/ip6t_LOG.c | |||
@@ -396,7 +396,7 @@ ip6t_log_packet(unsigned int pf, | |||
396 | /* MAC logging for input chain only. */ | 396 | /* MAC logging for input chain only. */ |
397 | printk("MAC="); | 397 | printk("MAC="); |
398 | if (skb->dev && (len = skb->dev->hard_header_len) && | 398 | if (skb->dev && (len = skb->dev->hard_header_len) && |
399 | skb->mac.raw != skb->nh.raw) { | 399 | skb->mac_header != skb->network_header) { |
400 | const unsigned char *p = skb_mac_header(skb); | 400 | const unsigned char *p = skb_mac_header(skb); |
401 | int i; | 401 | int i; |
402 | 402 | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 490e7e151f2d..b7889ceef556 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -630,8 +630,8 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev) | |||
630 | skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0]; | 630 | skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0]; |
631 | memmove(head->head + sizeof(struct frag_hdr), head->head, | 631 | memmove(head->head + sizeof(struct frag_hdr), head->head, |
632 | (head->data - head->head) - sizeof(struct frag_hdr)); | 632 | (head->data - head->head) - sizeof(struct frag_hdr)); |
633 | head->mac.raw += sizeof(struct frag_hdr); | 633 | head->mac_header += sizeof(struct frag_hdr); |
634 | head->nh.raw += sizeof(struct frag_hdr); | 634 | head->network_header += sizeof(struct frag_hdr); |
635 | 635 | ||
636 | skb_shinfo(head)->frag_list = head->next; | 636 | skb_shinfo(head)->frag_list = head->next; |
637 | skb_reset_transport_header(head); | 637 | skb_reset_transport_header(head); |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index f925ca7c1a50..8705f6a502d9 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -583,7 +583,7 @@ static int rawv6_send_hdrinc(struct sock *sk, void *from, int length, | |||
583 | 583 | ||
584 | skb->ip_summed = CHECKSUM_NONE; | 584 | skb->ip_summed = CHECKSUM_NONE; |
585 | 585 | ||
586 | skb->h.raw = skb->nh.raw; | 586 | skb->transport_header = skb->network_header; |
587 | err = memcpy_fromiovecend((void *)iph, from, 0, length); | 587 | err = memcpy_fromiovecend((void *)iph, from, 0, length); |
588 | if (err) | 588 | if (err) |
589 | goto error_fault; | 589 | goto error_fault; |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 6dfacfa7a599..de795c04e34c 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -646,11 +646,11 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in, | |||
646 | /* We have to remove fragment header from datagram and to relocate | 646 | /* We have to remove fragment header from datagram and to relocate |
647 | * header in order to calculate ICV correctly. */ | 647 | * header in order to calculate ICV correctly. */ |
648 | nhoff = fq->nhoffset; | 648 | nhoff = fq->nhoffset; |
649 | skb_network_header(head)[nhoff] = head->h.raw[0]; | 649 | skb_network_header(head)[nhoff] = skb_transport_header(head)[0]; |
650 | memmove(head->head + sizeof(struct frag_hdr), head->head, | 650 | memmove(head->head + sizeof(struct frag_hdr), head->head, |
651 | (head->data - head->head) - sizeof(struct frag_hdr)); | 651 | (head->data - head->head) - sizeof(struct frag_hdr)); |
652 | head->mac.raw += sizeof(struct frag_hdr); | 652 | head->mac_header += sizeof(struct frag_hdr); |
653 | head->nh.raw += sizeof(struct frag_hdr); | 653 | head->network_header += sizeof(struct frag_hdr); |
654 | 654 | ||
655 | skb_shinfo(head)->frag_list = head->next; | 655 | skb_shinfo(head)->frag_list = head->next; |
656 | skb_reset_transport_header(head); | 656 | skb_reset_transport_header(head); |
@@ -732,7 +732,7 @@ static int ipv6_frag_rcv(struct sk_buff **skbp) | |||
732 | 732 | ||
733 | if (!(fhdr->frag_off & htons(0xFFF9))) { | 733 | if (!(fhdr->frag_off & htons(0xFFF9))) { |
734 | /* It is not a fragmented frame */ | 734 | /* It is not a fragmented frame */ |
735 | skb->h.raw += sizeof(struct frag_hdr); | 735 | skb->transport_header += sizeof(struct frag_hdr); |
736 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMOKS); | 736 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMOKS); |
737 | 737 | ||
738 | IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb); | 738 | IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 1e8827b90aa7..27fe10ffacb0 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -382,7 +382,7 @@ static int ipip6_rcv(struct sk_buff *skb) | |||
382 | read_lock(&ipip6_lock); | 382 | read_lock(&ipip6_lock); |
383 | if ((tunnel = ipip6_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) { | 383 | if ((tunnel = ipip6_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) { |
384 | secpath_reset(skb); | 384 | secpath_reset(skb); |
385 | skb->mac.raw = skb->nh.raw; | 385 | skb->mac_header = skb->network_header; |
386 | skb_reset_network_header(skb); | 386 | skb_reset_network_header(skb); |
387 | IPCB(skb)->flags = 0; | 387 | IPCB(skb)->flags = 0; |
388 | skb->protocol = htons(ETH_P_IPV6); | 388 | skb->protocol = htons(ETH_P_IPV6); |
@@ -553,7 +553,7 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) | |||
553 | iph6 = ipv6_hdr(skb); | 553 | iph6 = ipv6_hdr(skb); |
554 | } | 554 | } |
555 | 555 | ||
556 | skb->h.raw = skb->nh.raw; | 556 | skb->transport_header = skb->network_header; |
557 | skb_push(skb, sizeof(struct iphdr)); | 557 | skb_push(skb, sizeof(struct iphdr)); |
558 | skb_reset_network_header(skb); | 558 | skb_reset_network_header(skb); |
559 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); | 559 | memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt)); |
diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index 8a01b0da2ddd..2e61d6ddece3 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_mode_beet.c | |||
@@ -48,8 +48,8 @@ static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb) | |||
48 | 48 | ||
49 | skb_reset_network_header(skb); | 49 | skb_reset_network_header(skb); |
50 | top_iph = ipv6_hdr(skb); | 50 | top_iph = ipv6_hdr(skb); |
51 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); | 51 | skb->transport_header = skb->network_header + sizeof(struct ipv6hdr); |
52 | skb->nh.raw += offsetof(struct ipv6hdr, nexthdr); | 52 | skb->network_header += offsetof(struct ipv6hdr, nexthdr); |
53 | 53 | ||
54 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); | 54 | ipv6_addr_copy(&top_iph->saddr, (struct in6_addr *)&x->props.saddr); |
55 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); | 55 | ipv6_addr_copy(&top_iph->daddr, (struct in6_addr *)&x->id.daddr); |
diff --git a/net/ipv6/xfrm6_mode_transport.c b/net/ipv6/xfrm6_mode_transport.c index eb1864b5aae7..c026bfea820a 100644 --- a/net/ipv6/xfrm6_mode_transport.c +++ b/net/ipv6/xfrm6_mode_transport.c | |||
@@ -54,10 +54,10 @@ static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) | |||
54 | { | 54 | { |
55 | int ihl = skb->data - skb_transport_header(skb); | 55 | int ihl = skb->data - skb_transport_header(skb); |
56 | 56 | ||
57 | if (skb->h.raw != skb->nh.raw) { | 57 | if (skb->transport_header != skb->network_header) { |
58 | memmove(skb_transport_header(skb), | 58 | memmove(skb_transport_header(skb), |
59 | skb_network_header(skb), ihl); | 59 | skb_network_header(skb), ihl); |
60 | skb->nh.raw = skb->h.raw; | 60 | skb->network_header = skb->transport_header; |
61 | } | 61 | } |
62 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - | 62 | ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - |
63 | sizeof(struct ipv6hdr)); | 63 | sizeof(struct ipv6hdr)); |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 21d65df7479e..a6c0cdf46ad6 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
@@ -55,8 +55,8 @@ static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb) | |||
55 | 55 | ||
56 | skb_reset_network_header(skb); | 56 | skb_reset_network_header(skb); |
57 | top_iph = ipv6_hdr(skb); | 57 | top_iph = ipv6_hdr(skb); |
58 | skb->h.raw = skb->nh.raw + sizeof(struct ipv6hdr); | 58 | skb->transport_header = skb->network_header + sizeof(struct ipv6hdr); |
59 | skb->nh.raw += offsetof(struct ipv6hdr, nexthdr); | 59 | skb->network_header += offsetof(struct ipv6hdr, nexthdr); |
60 | 60 | ||
61 | top_iph->version = 6; | 61 | top_iph->version = 6; |
62 | if (xdst->route->ops->family == AF_INET6) { | 62 | if (xdst->route->ops->family == AF_INET6) { |