aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index e5293b34229f..3a01effda695 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -129,9 +129,9 @@ void icmpv6_param_prob(struct sk_buff *skb, int code, int pos)
129 129
130static int is_ineligible(struct sk_buff *skb) 130static int is_ineligible(struct sk_buff *skb)
131{ 131{
132 int ptr = (u8*)(skb->nh.ipv6h+1) - skb->data; 132 int ptr = (u8 *)(ipv6_hdr(skb) + 1) - skb->data;
133 int len = skb->len - ptr; 133 int len = skb->len - ptr;
134 __u8 nexthdr = skb->nh.ipv6h->nexthdr; 134 __u8 nexthdr = ipv6_hdr(skb)->nexthdr;
135 135
136 if (len < 0) 136 if (len < 0)
137 return 1; 137 return 1;
@@ -275,7 +275,7 @@ static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, st
275#ifdef CONFIG_IPV6_MIP6 275#ifdef CONFIG_IPV6_MIP6
276static void mip6_addr_swap(struct sk_buff *skb) 276static void mip6_addr_swap(struct sk_buff *skb)
277{ 277{
278 struct ipv6hdr *iph = skb->nh.ipv6h; 278 struct ipv6hdr *iph = ipv6_hdr(skb);
279 struct inet6_skb_parm *opt = IP6CB(skb); 279 struct inet6_skb_parm *opt = IP6CB(skb);
280 struct ipv6_destopt_hao *hao; 280 struct ipv6_destopt_hao *hao;
281 struct in6_addr tmp; 281 struct in6_addr tmp;
@@ -303,7 +303,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
303 struct net_device *dev) 303 struct net_device *dev)
304{ 304{
305 struct inet6_dev *idev = NULL; 305 struct inet6_dev *idev = NULL;
306 struct ipv6hdr *hdr = skb->nh.ipv6h; 306 struct ipv6hdr *hdr = ipv6_hdr(skb);
307 struct sock *sk; 307 struct sock *sk;
308 struct ipv6_pinfo *np; 308 struct ipv6_pinfo *np;
309 struct in6_addr *saddr = NULL; 309 struct in6_addr *saddr = NULL;
@@ -485,7 +485,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
485 int hlimit; 485 int hlimit;
486 int tclass; 486 int tclass;
487 487
488 saddr = &skb->nh.ipv6h->daddr; 488 saddr = &ipv6_hdr(skb)->daddr;
489 489
490 if (!ipv6_unicast_destination(skb)) 490 if (!ipv6_unicast_destination(skb))
491 saddr = NULL; 491 saddr = NULL;
@@ -495,7 +495,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
495 495
496 memset(&fl, 0, sizeof(fl)); 496 memset(&fl, 0, sizeof(fl));
497 fl.proto = IPPROTO_ICMPV6; 497 fl.proto = IPPROTO_ICMPV6;
498 ipv6_addr_copy(&fl.fl6_dst, &skb->nh.ipv6h->saddr); 498 ipv6_addr_copy(&fl.fl6_dst, &ipv6_hdr(skb)->saddr);
499 if (saddr) 499 if (saddr)
500 ipv6_addr_copy(&fl.fl6_src, saddr); 500 ipv6_addr_copy(&fl.fl6_src, saddr);
501 fl.oif = skb->dev->ifindex; 501 fl.oif = skb->dev->ifindex;
@@ -583,8 +583,8 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info)
583 if (!pskb_may_pull(skb, inner_offset+8)) 583 if (!pskb_may_pull(skb, inner_offset+8))
584 return; 584 return;
585 585
586 saddr = &skb->nh.ipv6h->saddr; 586 saddr = &ipv6_hdr(skb)->saddr;
587 daddr = &skb->nh.ipv6h->daddr; 587 daddr = &ipv6_hdr(skb)->daddr;
588 588
589 /* BUGGG_FUTURE: we should try to parse exthdrs in this packet. 589 /* BUGGG_FUTURE: we should try to parse exthdrs in this packet.
590 Without this we will not able f.e. to make source routed 590 Without this we will not able f.e. to make source routed
@@ -628,8 +628,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
628 628
629 ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INMSGS); 629 ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INMSGS);
630 630
631 saddr = &skb->nh.ipv6h->saddr; 631 saddr = &ipv6_hdr(skb)->saddr;
632 daddr = &skb->nh.ipv6h->daddr; 632 daddr = &ipv6_hdr(skb)->daddr;
633 633
634 /* Perform checksum. */ 634 /* Perform checksum. */
635 switch (skb->ip_summed) { 635 switch (skb->ip_summed) {