diff options
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r-- | net/ipv6/exthdrs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index f763409ea740..f34cc2bd489a 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -143,7 +143,7 @@ static int ip6_parse_tlv(struct tlvtype_proc *procs, struct sk_buff **skbp) | |||
143 | struct sk_buff *skb = *skbp; | 143 | struct sk_buff *skb = *skbp; |
144 | struct tlvtype_proc *curr; | 144 | struct tlvtype_proc *curr; |
145 | const unsigned char *nh = skb_network_header(skb); | 145 | const unsigned char *nh = skb_network_header(skb); |
146 | int off = skb->h.raw - skb->nh.raw; | 146 | int off = skb_network_header_len(skb); |
147 | int len = (skb_transport_header(skb)[1] + 1) << 3; | 147 | int len = (skb_transport_header(skb)[1] + 1) << 3; |
148 | 148 | ||
149 | if (skb_transport_offset(skb) + len > skb_headlen(skb)) | 149 | if (skb_transport_offset(skb) + len > skb_headlen(skb)) |
@@ -297,7 +297,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp) | |||
297 | return -1; | 297 | return -1; |
298 | } | 298 | } |
299 | 299 | ||
300 | opt->lastopt = opt->dst1 = skb->h.raw - skb->nh.raw; | 300 | opt->lastopt = opt->dst1 = skb_network_header_len(skb); |
301 | #ifdef CONFIG_IPV6_MIP6 | 301 | #ifdef CONFIG_IPV6_MIP6 |
302 | dstbuf = opt->dst1; | 302 | dstbuf = opt->dst1; |
303 | #endif | 303 | #endif |
@@ -443,7 +443,7 @@ looped_back: | |||
443 | break; | 443 | break; |
444 | } | 444 | } |
445 | 445 | ||
446 | opt->lastopt = opt->srcrt = skb->h.raw - skb->nh.raw; | 446 | opt->lastopt = opt->srcrt = skb_network_header_len(skb); |
447 | skb->h.raw += (hdr->hdrlen + 1) << 3; | 447 | skb->h.raw += (hdr->hdrlen + 1) << 3; |
448 | opt->dst0 = opt->dst1; | 448 | opt->dst0 = opt->dst1; |
449 | opt->dst1 = 0; | 449 | opt->dst1 = 0; |
@@ -738,7 +738,7 @@ int ipv6_parse_hopopts(struct sk_buff **skbp) | |||
738 | 738 | ||
739 | /* | 739 | /* |
740 | * skb_network_header(skb) is equal to skb->data, and | 740 | * skb_network_header(skb) is equal to skb->data, and |
741 | * skb->h.raw - skb->nh.raw is always equal to | 741 | * skb_network_header_len(skb) is always equal to |
742 | * sizeof(struct ipv6hdr) by definition of | 742 | * sizeof(struct ipv6hdr) by definition of |
743 | * hop-by-hop options. | 743 | * hop-by-hop options. |
744 | */ | 744 | */ |