aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/exthdrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r--net/ipv6/exthdrs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 9ebf120ba6d3..dab069b0b3f6 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -125,7 +125,7 @@ static int ip6_tlvopt_unknown(struct sk_buff **skbp, int optoff)
125 /* Actually, it is redundant check. icmp_send 125 /* Actually, it is redundant check. icmp_send
126 will recheck in any case. 126 will recheck in any case.
127 */ 127 */
128 if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr)) 128 if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr))
129 break; 129 break;
130 case 2: /* send ICMP PARM PROB regardless and drop packet */ 130 case 2: /* send ICMP PARM PROB regardless and drop packet */
131 icmpv6_param_prob(skb, ICMPV6_UNK_OPTION, optoff); 131 icmpv6_param_prob(skb, ICMPV6_UNK_OPTION, optoff);
@@ -202,7 +202,7 @@ static int ipv6_dest_hao(struct sk_buff **skbp, int optoff)
202 struct sk_buff *skb = *skbp; 202 struct sk_buff *skb = *skbp;
203 struct ipv6_destopt_hao *hao; 203 struct ipv6_destopt_hao *hao;
204 struct inet6_skb_parm *opt = IP6CB(skb); 204 struct inet6_skb_parm *opt = IP6CB(skb);
205 struct ipv6hdr *ipv6h = skb->nh.ipv6h; 205 struct ipv6hdr *ipv6h = ipv6_hdr(skb);
206 struct in6_addr tmp_addr; 206 struct in6_addr tmp_addr;
207 int ret; 207 int ret;
208 208
@@ -248,7 +248,7 @@ static int ipv6_dest_hao(struct sk_buff **skbp, int optoff)
248 *skbp = skb = skb2; 248 *skbp = skb = skb2;
249 hao = (struct ipv6_destopt_hao *)(skb_network_header(skb2) + 249 hao = (struct ipv6_destopt_hao *)(skb_network_header(skb2) +
250 optoff); 250 optoff);
251 ipv6h = skb2->nh.ipv6h; 251 ipv6h = ipv6_hdr(skb2);
252 } 252 }
253 253
254 if (skb->ip_summed == CHECKSUM_COMPLETE) 254 if (skb->ip_summed == CHECKSUM_COMPLETE)
@@ -414,7 +414,7 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp)
414 return -1; 414 return -1;
415 } 415 }
416 416
417 if (ipv6_addr_is_multicast(&skb->nh.ipv6h->daddr) || 417 if (ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr) ||
418 skb->pkt_type != PACKET_HOST) { 418 skb->pkt_type != PACKET_HOST) {
419 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), 419 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
420 IPSTATS_MIB_INADDRERRORS); 420 IPSTATS_MIB_INADDRERRORS);
@@ -522,7 +522,7 @@ looped_back:
522#ifdef CONFIG_IPV6_MIP6 522#ifdef CONFIG_IPV6_MIP6
523 case IPV6_SRCRT_TYPE_2: 523 case IPV6_SRCRT_TYPE_2:
524 if (xfrm6_input_addr(skb, (xfrm_address_t *)addr, 524 if (xfrm6_input_addr(skb, (xfrm_address_t *)addr,
525 (xfrm_address_t *)&skb->nh.ipv6h->saddr, 525 (xfrm_address_t *)&ipv6_hdr(skb)->saddr,
526 IPPROTO_ROUTING) < 0) { 526 IPPROTO_ROUTING) < 0) {
527 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), 527 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
528 IPSTATS_MIB_INADDRERRORS); 528 IPSTATS_MIB_INADDRERRORS);
@@ -549,8 +549,8 @@ looped_back:
549 } 549 }
550 550
551 ipv6_addr_copy(&daddr, addr); 551 ipv6_addr_copy(&daddr, addr);
552 ipv6_addr_copy(addr, &skb->nh.ipv6h->daddr); 552 ipv6_addr_copy(addr, &ipv6_hdr(skb)->daddr);
553 ipv6_addr_copy(&skb->nh.ipv6h->daddr, &daddr); 553 ipv6_addr_copy(&ipv6_hdr(skb)->daddr, &daddr);
554 554
555 dst_release(xchg(&skb->dst, NULL)); 555 dst_release(xchg(&skb->dst, NULL));
556 ip6_route_input(skb); 556 ip6_route_input(skb);
@@ -561,7 +561,7 @@ looped_back:
561 } 561 }
562 562
563 if (skb->dst->dev->flags&IFF_LOOPBACK) { 563 if (skb->dst->dev->flags&IFF_LOOPBACK) {
564 if (skb->nh.ipv6h->hop_limit <= 1) { 564 if (ipv6_hdr(skb)->hop_limit <= 1) {
565 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), 565 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
566 IPSTATS_MIB_INHDRERRORS); 566 IPSTATS_MIB_INHDRERRORS);
567 icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT, 567 icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
@@ -569,7 +569,7 @@ looped_back:
569 kfree_skb(skb); 569 kfree_skb(skb);
570 return -1; 570 return -1;
571 } 571 }
572 skb->nh.ipv6h->hop_limit--; 572 ipv6_hdr(skb)->hop_limit--;
573 goto looped_back; 573 goto looped_back;
574 } 574 }
575 575
@@ -698,7 +698,7 @@ static int ipv6_hop_jumbo(struct sk_buff **skbp, int optoff)
698 icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff+2); 698 icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff+2);
699 return 0; 699 return 0;
700 } 700 }
701 if (skb->nh.ipv6h->payload_len) { 701 if (ipv6_hdr(skb)->payload_len) {
702 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS); 702 IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INHDRERRORS);
703 icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff); 703 icmpv6_param_prob(skb, ICMPV6_HDR_FIELD, optoff);
704 return 0; 704 return 0;