|
@@ -38,6 +38,8 @@
|
|
* status etc.
|
|
* status etc.
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+#define pr_fmt(fmt) "IPv6: " fmt
|
|
|
|
+
|
|
#include <linux/errno.h>
|
|
#include <linux/errno.h>
|
|
#include <linux/types.h>
|
|
#include <linux/types.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/kernel.h>
|
|
@@ -327,11 +329,11 @@ void in6_dev_finish_destroy(struct inet6_dev *idev)
|
|
WARN_ON(idev->mc_list != NULL);
|
|
WARN_ON(idev->mc_list != NULL);
|
|
|
|
|
|
#ifdef NET_REFCNT_DEBUG
|
|
#ifdef NET_REFCNT_DEBUG
|
|
- printk(KERN_DEBUG "in6_dev_finish_destroy: %s\n", dev ? dev->name : "NIL");
|
|
|
|
|
|
+ printk(KERN_DEBUG "%s: %s\n", __func__, dev ? dev->name : "NIL");
|
|
#endif
|
|
#endif
|
|
dev_put(dev);
|
|
dev_put(dev);
|
|
if (!idev->dead) {
|
|
if (!idev->dead) {
|
|
- pr_warning("Freeing alive inet6 device %p\n", idev);
|
|
|
|
|
|
+ pr_warn("Freeing alive inet6 device %p\n", idev);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
snmp6_free_dev(idev);
|
|
snmp6_free_dev(idev);
|
|
@@ -372,7 +374,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
|
|
|
|
|
|
if (snmp6_alloc_dev(ndev) < 0) {
|
|
if (snmp6_alloc_dev(ndev) < 0) {
|
|
ADBG((KERN_WARNING
|
|
ADBG((KERN_WARNING
|
|
- "%s(): cannot allocate memory for statistics; dev=%s.\n",
|
|
|
|
|
|
+ "%s: cannot allocate memory for statistics; dev=%s.\n",
|
|
__func__, dev->name));
|
|
__func__, dev->name));
|
|
neigh_parms_release(&nd_tbl, ndev->nd_parms);
|
|
neigh_parms_release(&nd_tbl, ndev->nd_parms);
|
|
dev_put(dev);
|
|
dev_put(dev);
|
|
@@ -382,7 +384,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
|
|
|
|
|
|
if (snmp6_register_dev(ndev) < 0) {
|
|
if (snmp6_register_dev(ndev) < 0) {
|
|
ADBG((KERN_WARNING
|
|
ADBG((KERN_WARNING
|
|
- "%s(): cannot create /proc/net/dev_snmp6/%s\n",
|
|
|
|
|
|
+ "%s: cannot create /proc/net/dev_snmp6/%s\n",
|
|
__func__, dev->name));
|
|
__func__, dev->name));
|
|
neigh_parms_release(&nd_tbl, ndev->nd_parms);
|
|
neigh_parms_release(&nd_tbl, ndev->nd_parms);
|
|
ndev->dead = 1;
|
|
ndev->dead = 1;
|
|
@@ -400,9 +402,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
|
|
|
|
|
|
#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE)
|
|
#if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE)
|
|
if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) {
|
|
if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) {
|
|
- printk(KERN_INFO
|
|
|
|
- "%s: Disabled Multicast RS\n",
|
|
|
|
- dev->name);
|
|
|
|
|
|
+ pr_info("%s: Disabled Multicast RS\n", dev->name);
|
|
ndev->cnf.rtr_solicits = 0;
|
|
ndev->cnf.rtr_solicits = 0;
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
@@ -551,7 +551,7 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp)
|
|
pr_notice("Timer is still running, when freeing ifa=%p\n", ifp);
|
|
pr_notice("Timer is still running, when freeing ifa=%p\n", ifp);
|
|
|
|
|
|
if (ifp->state != INET6_IFADDR_STATE_DEAD) {
|
|
if (ifp->state != INET6_IFADDR_STATE_DEAD) {
|
|
- pr_warning("Freeing alive inet6 address %p\n", ifp);
|
|
|
|
|
|
+ pr_warn("Freeing alive inet6 address %p\n", ifp);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
dst_release(&ifp->rt->dst);
|
|
dst_release(&ifp->rt->dst);
|
|
@@ -841,8 +841,7 @@ retry:
|
|
in6_dev_hold(idev);
|
|
in6_dev_hold(idev);
|
|
if (idev->cnf.use_tempaddr <= 0) {
|
|
if (idev->cnf.use_tempaddr <= 0) {
|
|
write_unlock(&idev->lock);
|
|
write_unlock(&idev->lock);
|
|
- printk(KERN_INFO
|
|
|
|
- "ipv6_create_tempaddr(): use_tempaddr is disabled.\n");
|
|
|
|
|
|
+ pr_info("%s: use_tempaddr is disabled\n", __func__);
|
|
in6_dev_put(idev);
|
|
in6_dev_put(idev);
|
|
ret = -1;
|
|
ret = -1;
|
|
goto out;
|
|
goto out;
|
|
@@ -852,8 +851,8 @@ retry:
|
|
idev->cnf.use_tempaddr = -1; /*XXX*/
|
|
idev->cnf.use_tempaddr = -1; /*XXX*/
|
|
spin_unlock_bh(&ifp->lock);
|
|
spin_unlock_bh(&ifp->lock);
|
|
write_unlock(&idev->lock);
|
|
write_unlock(&idev->lock);
|
|
- printk(KERN_WARNING
|
|
|
|
- "ipv6_create_tempaddr(): regeneration time exceeded. disabled temporary address support.\n");
|
|
|
|
|
|
+ pr_warn("%s: regeneration time exceeded - disabled temporary address support\n",
|
|
|
|
+ __func__);
|
|
in6_dev_put(idev);
|
|
in6_dev_put(idev);
|
|
ret = -1;
|
|
ret = -1;
|
|
goto out;
|
|
goto out;
|
|
@@ -863,8 +862,8 @@ retry:
|
|
if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
|
|
if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) {
|
|
spin_unlock_bh(&ifp->lock);
|
|
spin_unlock_bh(&ifp->lock);
|
|
write_unlock(&idev->lock);
|
|
write_unlock(&idev->lock);
|
|
- printk(KERN_WARNING
|
|
|
|
- "ipv6_create_tempaddr(): regeneration of randomized interface id failed.\n");
|
|
|
|
|
|
+ pr_warn("%s: regeneration of randomized interface id failed\n",
|
|
|
|
+ __func__);
|
|
in6_ifa_put(ifp);
|
|
in6_ifa_put(ifp);
|
|
in6_dev_put(idev);
|
|
in6_dev_put(idev);
|
|
ret = -1;
|
|
ret = -1;
|
|
@@ -914,8 +913,7 @@ retry:
|
|
if (!ift || IS_ERR(ift)) {
|
|
if (!ift || IS_ERR(ift)) {
|
|
in6_ifa_put(ifp);
|
|
in6_ifa_put(ifp);
|
|
in6_dev_put(idev);
|
|
in6_dev_put(idev);
|
|
- printk(KERN_INFO
|
|
|
|
- "ipv6_create_tempaddr(): retry temporary address regeneration.\n");
|
|
|
|
|
|
+ pr_info("%s: retry temporary address regeneration\n", __func__);
|
|
tmpaddr = &addr;
|
|
tmpaddr = &addr;
|
|
write_lock(&idev->lock);
|
|
write_lock(&idev->lock);
|
|
goto retry;
|
|
goto retry;
|
|
@@ -1429,7 +1427,7 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp)
|
|
/* DAD failed for link-local based on MAC address */
|
|
/* DAD failed for link-local based on MAC address */
|
|
idev->cnf.disable_ipv6 = 1;
|
|
idev->cnf.disable_ipv6 = 1;
|
|
|
|
|
|
- printk(KERN_INFO "%s: IPv6 being disabled!\n",
|
|
|
|
|
|
+ pr_info("%s: IPv6 being disabled!\n",
|
|
ifp->idev->dev->name);
|
|
ifp->idev->dev->name);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1660,9 +1658,8 @@ static void ipv6_regen_rndid(unsigned long data)
|
|
idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time -
|
|
idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time -
|
|
idev->cnf.max_desync_factor * HZ;
|
|
idev->cnf.max_desync_factor * HZ;
|
|
if (time_before(expires, jiffies)) {
|
|
if (time_before(expires, jiffies)) {
|
|
- printk(KERN_WARNING
|
|
|
|
- "ipv6_regen_rndid(): too short regeneration interval; timer disabled for %s.\n",
|
|
|
|
- idev->dev->name);
|
|
|
|
|
|
+ pr_warn("%s: too short regeneration interval; timer disabled for %s\n",
|
|
|
|
+ __func__, idev->dev->name);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2507,7 +2504,7 @@ static void addrconf_gre_config(struct net_device *dev)
|
|
struct inet6_dev *idev;
|
|
struct inet6_dev *idev;
|
|
struct in6_addr addr;
|
|
struct in6_addr addr;
|
|
|
|
|
|
- pr_info("ipv6: addrconf_gre_config(%s)\n", dev->name);
|
|
|
|
|
|
+ pr_info("%s(%s)\n", __func__, dev->name);
|
|
|
|
|
|
ASSERT_RTNL();
|
|
ASSERT_RTNL();
|
|
|
|
|
|
@@ -2599,9 +2596,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
|
if (event == NETDEV_UP) {
|
|
if (event == NETDEV_UP) {
|
|
if (!addrconf_qdisc_ok(dev)) {
|
|
if (!addrconf_qdisc_ok(dev)) {
|
|
/* device is not ready yet. */
|
|
/* device is not ready yet. */
|
|
- printk(KERN_INFO
|
|
|
|
- "ADDRCONF(NETDEV_UP): %s: "
|
|
|
|
- "link is not ready\n",
|
|
|
|
|
|
+ pr_info("ADDRCONF(NETDEV_UP): %s: link is not ready\n",
|
|
dev->name);
|
|
dev->name);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
@@ -2626,10 +2621,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
|
|
idev->if_flags |= IF_READY;
|
|
idev->if_flags |= IF_READY;
|
|
}
|
|
}
|
|
|
|
|
|
- printk(KERN_INFO
|
|
|
|
- "ADDRCONF(NETDEV_CHANGE): %s: "
|
|
|
|
- "link becomes ready\n",
|
|
|
|
- dev->name);
|
|
|
|
|
|
+ pr_info("ADDRCONF(NETDEV_CHANGE): %s: link becomes ready\n",
|
|
|
|
+ dev->name);
|
|
|
|
|
|
run_pending = 1;
|
|
run_pending = 1;
|
|
}
|
|
}
|
|
@@ -4757,8 +4750,8 @@ int __init addrconf_init(void)
|
|
|
|
|
|
err = ipv6_addr_label_init();
|
|
err = ipv6_addr_label_init();
|
|
if (err < 0) {
|
|
if (err < 0) {
|
|
- printk(KERN_CRIT "IPv6 Addrconf:"
|
|
|
|
- " cannot initialize default policy table: %d.\n", err);
|
|
|
|
|
|
+ pr_crit("%s: cannot initialize default policy table: %d\n",
|
|
|
|
+ __func__, err);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|