diff options
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 2cb2bf845641..c75efbdc71cb 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -713,11 +713,10 @@ static void icmp_unreach(struct sk_buff *skb) | |||
713 | 713 | ||
714 | if (!net->ipv4.sysctl_icmp_ignore_bogus_error_responses && | 714 | if (!net->ipv4.sysctl_icmp_ignore_bogus_error_responses && |
715 | inet_addr_type(net, iph->daddr) == RTN_BROADCAST) { | 715 | inet_addr_type(net, iph->daddr) == RTN_BROADCAST) { |
716 | if (net_ratelimit()) | 716 | net_warn_ratelimited("%pI4 sent an invalid ICMP type %u, code %u error to a broadcast: %pI4 on %s\n", |
717 | pr_warn("%pI4 sent an invalid ICMP type %u, code %u error to a broadcast: %pI4 on %s\n", | 717 | &ip_hdr(skb)->saddr, |
718 | &ip_hdr(skb)->saddr, | 718 | icmph->type, icmph->code, |
719 | icmph->type, icmph->code, | 719 | &iph->daddr, skb->dev->name); |
720 | &iph->daddr, skb->dev->name); | ||
721 | goto out; | 720 | goto out; |
722 | } | 721 | } |
723 | 722 | ||
@@ -906,8 +905,7 @@ out_err: | |||
906 | static void icmp_address(struct sk_buff *skb) | 905 | static void icmp_address(struct sk_buff *skb) |
907 | { | 906 | { |
908 | #if 0 | 907 | #if 0 |
909 | if (net_ratelimit()) | 908 | net_dbg_ratelimited("a guy asks for address mask. Who is it?\n"); |
910 | printk(KERN_DEBUG "a guy asks for address mask. Who is it?\n"); | ||
911 | #endif | 909 | #endif |
912 | } | 910 | } |
913 | 911 | ||
@@ -943,10 +941,10 @@ static void icmp_address_reply(struct sk_buff *skb) | |||
943 | inet_ifa_match(ip_hdr(skb)->saddr, ifa)) | 941 | inet_ifa_match(ip_hdr(skb)->saddr, ifa)) |
944 | break; | 942 | break; |
945 | } | 943 | } |
946 | if (!ifa && net_ratelimit()) { | 944 | if (!ifa) |
947 | pr_info("Wrong address mask %pI4 from %s/%pI4\n", | 945 | net_info_ratelimited("Wrong address mask %pI4 from %s/%pI4\n", |
948 | mp, dev->name, &ip_hdr(skb)->saddr); | 946 | mp, |
949 | } | 947 | dev->name, &ip_hdr(skb)->saddr); |
950 | } | 948 | } |
951 | } | 949 | } |
952 | 950 | ||