diff options
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 4d70c21c50aa..8372f8b8f0cd 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -355,7 +355,7 @@ static void icmp_push_reply(struct icmp_bxm *icmp_param, | |||
355 | ipc, rt, MSG_DONTWAIT) < 0) | 355 | ipc, rt, MSG_DONTWAIT) < 0) |
356 | ip_flush_pending_frames(icmp_socket->sk); | 356 | ip_flush_pending_frames(icmp_socket->sk); |
357 | else if ((skb = skb_peek(&icmp_socket->sk->sk_write_queue)) != NULL) { | 357 | else if ((skb = skb_peek(&icmp_socket->sk->sk_write_queue)) != NULL) { |
358 | struct icmphdr *icmph = skb->h.icmph; | 358 | struct icmphdr *icmph = icmp_hdr(skb); |
359 | __wsum csum = 0; | 359 | __wsum csum = 0; |
360 | struct sk_buff *skb1; | 360 | struct sk_buff *skb1; |
361 | 361 | ||
@@ -613,7 +613,7 @@ static void icmp_unreach(struct sk_buff *skb) | |||
613 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) | 613 | if (!pskb_may_pull(skb, sizeof(struct iphdr))) |
614 | goto out_err; | 614 | goto out_err; |
615 | 615 | ||
616 | icmph = skb->h.icmph; | 616 | icmph = icmp_hdr(skb); |
617 | iph = (struct iphdr *)skb->data; | 617 | iph = (struct iphdr *)skb->data; |
618 | 618 | ||
619 | if (iph->ihl < 5) /* Mangled header, drop. */ | 619 | if (iph->ihl < 5) /* Mangled header, drop. */ |
@@ -743,7 +743,7 @@ static void icmp_redirect(struct sk_buff *skb) | |||
743 | 743 | ||
744 | iph = (struct iphdr *)skb->data; | 744 | iph = (struct iphdr *)skb->data; |
745 | 745 | ||
746 | switch (skb->h.icmph->code & 7) { | 746 | switch (icmp_hdr(skb)->code & 7) { |
747 | case ICMP_REDIR_NET: | 747 | case ICMP_REDIR_NET: |
748 | case ICMP_REDIR_NETTOS: | 748 | case ICMP_REDIR_NETTOS: |
749 | /* | 749 | /* |
@@ -752,7 +752,7 @@ static void icmp_redirect(struct sk_buff *skb) | |||
752 | case ICMP_REDIR_HOST: | 752 | case ICMP_REDIR_HOST: |
753 | case ICMP_REDIR_HOSTTOS: | 753 | case ICMP_REDIR_HOSTTOS: |
754 | ip_rt_redirect(ip_hdr(skb)->saddr, iph->daddr, | 754 | ip_rt_redirect(ip_hdr(skb)->saddr, iph->daddr, |
755 | skb->h.icmph->un.gateway, | 755 | icmp_hdr(skb)->un.gateway, |
756 | iph->saddr, skb->dev); | 756 | iph->saddr, skb->dev); |
757 | break; | 757 | break; |
758 | } | 758 | } |
@@ -780,7 +780,7 @@ static void icmp_echo(struct sk_buff *skb) | |||
780 | if (!sysctl_icmp_echo_ignore_all) { | 780 | if (!sysctl_icmp_echo_ignore_all) { |
781 | struct icmp_bxm icmp_param; | 781 | struct icmp_bxm icmp_param; |
782 | 782 | ||
783 | icmp_param.data.icmph = *skb->h.icmph; | 783 | icmp_param.data.icmph = *icmp_hdr(skb); |
784 | icmp_param.data.icmph.type = ICMP_ECHOREPLY; | 784 | icmp_param.data.icmph.type = ICMP_ECHOREPLY; |
785 | icmp_param.skb = skb; | 785 | icmp_param.skb = skb; |
786 | icmp_param.offset = 0; | 786 | icmp_param.offset = 0; |
@@ -816,7 +816,7 @@ static void icmp_timestamp(struct sk_buff *skb) | |||
816 | icmp_param.data.times[2] = icmp_param.data.times[1]; | 816 | icmp_param.data.times[2] = icmp_param.data.times[1]; |
817 | if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4)) | 817 | if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4)) |
818 | BUG(); | 818 | BUG(); |
819 | icmp_param.data.icmph = *skb->h.icmph; | 819 | icmp_param.data.icmph = *icmp_hdr(skb); |
820 | icmp_param.data.icmph.type = ICMP_TIMESTAMPREPLY; | 820 | icmp_param.data.icmph.type = ICMP_TIMESTAMPREPLY; |
821 | icmp_param.data.icmph.code = 0; | 821 | icmp_param.data.icmph.code = 0; |
822 | icmp_param.skb = skb; | 822 | icmp_param.skb = skb; |
@@ -943,7 +943,7 @@ int icmp_rcv(struct sk_buff *skb) | |||
943 | if (!pskb_pull(skb, sizeof(struct icmphdr))) | 943 | if (!pskb_pull(skb, sizeof(struct icmphdr))) |
944 | goto error; | 944 | goto error; |
945 | 945 | ||
946 | icmph = skb->h.icmph; | 946 | icmph = icmp_hdr(skb); |
947 | 947 | ||
948 | /* | 948 | /* |
949 | * 18 is the highest 'known' ICMP type. Anything else is a mystery | 949 | * 18 is the highest 'known' ICMP type. Anything else is a mystery |