net: Convert net_ratelimit uses to net_<level>_ratelimited
[deliverable/linux.git] / net / ipv6 / addrconf.c
index 8b7f100a4b455dc9de10b27f2edd17cc05d9ace9..4d1d51a0bd26c8938734c058294ae1295aa64dad 100644 (file)
@@ -1415,9 +1415,8 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp)
                return;
        }
 
-       if (net_ratelimit())
-               printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n",
-                       ifp->idev->dev->name, &ifp->addr);
+       net_info_ratelimited("%s: IPv6 duplicate address %pI6c detected!\n",
+                            ifp->idev->dev->name, &ifp->addr);
 
        if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) {
                struct in6_addr addr;
@@ -1847,16 +1846,15 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
        prefered_lft = ntohl(pinfo->prefered);
 
        if (prefered_lft > valid_lft) {
-               if (net_ratelimit())
-                       printk(KERN_WARNING "addrconf: prefix option has invalid lifetime\n");
+               net_warn_ratelimited("addrconf: prefix option has invalid lifetime\n");
                return;
        }
 
        in6_dev = in6_dev_get(dev);
 
        if (in6_dev == NULL) {
-               if (net_ratelimit())
-                       printk(KERN_DEBUG "addrconf: device %s not configured\n", dev->name);
+               net_dbg_ratelimited("addrconf: device %s not configured\n",
+                                   dev->name);
                return;
        }
 
@@ -1931,9 +1929,8 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
                        }
                        goto ok;
                }
-               if (net_ratelimit())
-                       printk(KERN_DEBUG "IPv6 addrconf: prefix with wrong length %d\n",
-                              pinfo->prefix_len);
+               net_dbg_ratelimited("IPv6 addrconf: prefix with wrong length %d\n",
+                                   pinfo->prefix_len);
                in6_dev_put(in6_dev);
                return;
 
This page took 0.025159 seconds and 5 git commands to generate.