aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index e5f8a71d3a2..74e35e5736e 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -373,7 +373,7 @@ out_unlock:
373} 373}
374 374
375static struct rtable *icmp_route_lookup(struct net *net, struct sk_buff *skb_in, 375static struct rtable *icmp_route_lookup(struct net *net, struct sk_buff *skb_in,
376 struct iphdr *iph, 376 const struct iphdr *iph,
377 __be32 saddr, u8 tos, 377 __be32 saddr, u8 tos,
378 int type, int code, 378 int type, int code,
379 struct icmp_bxm *param) 379 struct icmp_bxm *param)
@@ -637,7 +637,7 @@ EXPORT_SYMBOL(icmp_send);
637 637
638static void icmp_unreach(struct sk_buff *skb) 638static void icmp_unreach(struct sk_buff *skb)
639{ 639{
640 struct iphdr *iph; 640 const struct iphdr *iph;
641 struct icmphdr *icmph; 641 struct icmphdr *icmph;
642 int hash, protocol; 642 int hash, protocol;
643 const struct net_protocol *ipprot; 643 const struct net_protocol *ipprot;
@@ -656,7 +656,7 @@ static void icmp_unreach(struct sk_buff *skb)
656 goto out_err; 656 goto out_err;
657 657
658 icmph = icmp_hdr(skb); 658 icmph = icmp_hdr(skb);
659 iph = (struct iphdr *)skb->data; 659 iph = (const struct iphdr *)skb->data;
660 660
661 if (iph->ihl < 5) /* Mangled header, drop. */ 661 if (iph->ihl < 5) /* Mangled header, drop. */
662 goto out_err; 662 goto out_err;
@@ -729,7 +729,7 @@ static void icmp_unreach(struct sk_buff *skb)
729 if (!pskb_may_pull(skb, iph->ihl * 4 + 8)) 729 if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
730 goto out; 730 goto out;
731 731
732 iph = (struct iphdr *)skb->data; 732 iph = (const struct iphdr *)skb->data;
733 protocol = iph->protocol; 733 protocol = iph->protocol;
734 734
735 /* 735 /*
@@ -758,7 +758,7 @@ out_err:
758 758
759static void icmp_redirect(struct sk_buff *skb) 759static void icmp_redirect(struct sk_buff *skb)
760{ 760{
761 struct iphdr *iph; 761 const struct iphdr *iph;
762 762
763 if (skb->len < sizeof(struct iphdr)) 763 if (skb->len < sizeof(struct iphdr))
764 goto out_err; 764 goto out_err;
@@ -769,7 +769,7 @@ static void icmp_redirect(struct sk_buff *skb)
769 if (!pskb_may_pull(skb, sizeof(struct iphdr))) 769 if (!pskb_may_pull(skb, sizeof(struct iphdr)))
770 goto out; 770 goto out;
771 771
772 iph = (struct iphdr *)skb->data; 772 iph = (const struct iphdr *)skb->data;
773 773
774 switch (icmp_hdr(skb)->code & 7) { 774 switch (icmp_hdr(skb)->code & 7) {
775 case ICMP_REDIR_NET: 775 case ICMP_REDIR_NET: