diff options
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 3a01effda695..d3edc3cf1ce9 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -222,7 +222,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct | |||
222 | if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) | 222 | if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) |
223 | goto out; | 223 | goto out; |
224 | 224 | ||
225 | icmp6h = (struct icmp6hdr*) skb->h.raw; | 225 | icmp6h = icmp6_hdr(skb); |
226 | memcpy(icmp6h, thdr, sizeof(struct icmp6hdr)); | 226 | memcpy(icmp6h, thdr, sizeof(struct icmp6hdr)); |
227 | icmp6h->icmp6_cksum = 0; | 227 | icmp6h->icmp6_cksum = 0; |
228 | 228 | ||
@@ -476,7 +476,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
476 | struct inet6_dev *idev; | 476 | struct inet6_dev *idev; |
477 | struct ipv6_pinfo *np; | 477 | struct ipv6_pinfo *np; |
478 | struct in6_addr *saddr = NULL; | 478 | struct in6_addr *saddr = NULL; |
479 | struct icmp6hdr *icmph = (struct icmp6hdr *) skb->h.raw; | 479 | struct icmp6hdr *icmph = icmp6_hdr(skb); |
480 | struct icmp6hdr tmp_hdr; | 480 | struct icmp6hdr tmp_hdr; |
481 | struct flowi fl; | 481 | struct flowi fl; |
482 | struct icmpv6_msg msg; | 482 | struct icmpv6_msg msg; |
@@ -651,7 +651,7 @@ static int icmpv6_rcv(struct sk_buff **pskb) | |||
651 | if (!pskb_pull(skb, sizeof(struct icmp6hdr))) | 651 | if (!pskb_pull(skb, sizeof(struct icmp6hdr))) |
652 | goto discard_it; | 652 | goto discard_it; |
653 | 653 | ||
654 | hdr = (struct icmp6hdr *) skb->h.raw; | 654 | hdr = icmp6_hdr(skb); |
655 | 655 | ||
656 | type = hdr->icmp6_type; | 656 | type = hdr->icmp6_type; |
657 | 657 | ||
@@ -677,7 +677,7 @@ static int icmpv6_rcv(struct sk_buff **pskb) | |||
677 | */ | 677 | */ |
678 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) | 678 | if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) |
679 | goto discard_it; | 679 | goto discard_it; |
680 | hdr = (struct icmp6hdr *) skb->h.raw; | 680 | hdr = icmp6_hdr(skb); |
681 | orig_hdr = (struct ipv6hdr *) (hdr + 1); | 681 | orig_hdr = (struct ipv6hdr *) (hdr + 1); |
682 | rt6_pmtu_discovery(&orig_hdr->daddr, &orig_hdr->saddr, dev, | 682 | rt6_pmtu_discovery(&orig_hdr->daddr, &orig_hdr->saddr, dev, |
683 | ntohl(hdr->icmp6_mtu)); | 683 | ntohl(hdr->icmp6_mtu)); |