diff options
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 53 |
1 files changed, 23 insertions, 30 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 4d1d51a0bd26..707989068555 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -38,6 +38,8 @@ | |||
38 | * status etc. | 38 | * status etc. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #define pr_fmt(fmt) "IPv6: " fmt | ||
42 | |||
41 | #include <linux/errno.h> | 43 | #include <linux/errno.h> |
42 | #include <linux/types.h> | 44 | #include <linux/types.h> |
43 | #include <linux/kernel.h> | 45 | #include <linux/kernel.h> |
@@ -327,11 +329,11 @@ void in6_dev_finish_destroy(struct inet6_dev *idev) | |||
327 | WARN_ON(idev->mc_list != NULL); | 329 | WARN_ON(idev->mc_list != NULL); |
328 | 330 | ||
329 | #ifdef NET_REFCNT_DEBUG | 331 | #ifdef NET_REFCNT_DEBUG |
330 | printk(KERN_DEBUG "in6_dev_finish_destroy: %s\n", dev ? dev->name : "NIL"); | 332 | printk(KERN_DEBUG "%s: %s\n", __func__, dev ? dev->name : "NIL"); |
331 | #endif | 333 | #endif |
332 | dev_put(dev); | 334 | dev_put(dev); |
333 | if (!idev->dead) { | 335 | if (!idev->dead) { |
334 | pr_warning("Freeing alive inet6 device %p\n", idev); | 336 | pr_warn("Freeing alive inet6 device %p\n", idev); |
335 | return; | 337 | return; |
336 | } | 338 | } |
337 | snmp6_free_dev(idev); | 339 | snmp6_free_dev(idev); |
@@ -372,7 +374,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev) | |||
372 | 374 | ||
373 | if (snmp6_alloc_dev(ndev) < 0) { | 375 | if (snmp6_alloc_dev(ndev) < 0) { |
374 | ADBG((KERN_WARNING | 376 | ADBG((KERN_WARNING |
375 | "%s(): cannot allocate memory for statistics; dev=%s.\n", | 377 | "%s: cannot allocate memory for statistics; dev=%s.\n", |
376 | __func__, dev->name)); | 378 | __func__, dev->name)); |
377 | neigh_parms_release(&nd_tbl, ndev->nd_parms); | 379 | neigh_parms_release(&nd_tbl, ndev->nd_parms); |
378 | dev_put(dev); | 380 | dev_put(dev); |
@@ -382,7 +384,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev) | |||
382 | 384 | ||
383 | if (snmp6_register_dev(ndev) < 0) { | 385 | if (snmp6_register_dev(ndev) < 0) { |
384 | ADBG((KERN_WARNING | 386 | ADBG((KERN_WARNING |
385 | "%s(): cannot create /proc/net/dev_snmp6/%s\n", | 387 | "%s: cannot create /proc/net/dev_snmp6/%s\n", |
386 | __func__, dev->name)); | 388 | __func__, dev->name)); |
387 | neigh_parms_release(&nd_tbl, ndev->nd_parms); | 389 | neigh_parms_release(&nd_tbl, ndev->nd_parms); |
388 | ndev->dead = 1; | 390 | ndev->dead = 1; |
@@ -400,9 +402,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev) | |||
400 | 402 | ||
401 | #if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) | 403 | #if defined(CONFIG_IPV6_SIT) || defined(CONFIG_IPV6_SIT_MODULE) |
402 | if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { | 404 | if (dev->type == ARPHRD_SIT && (dev->priv_flags & IFF_ISATAP)) { |
403 | printk(KERN_INFO | 405 | pr_info("%s: Disabled Multicast RS\n", dev->name); |
404 | "%s: Disabled Multicast RS\n", | ||
405 | dev->name); | ||
406 | ndev->cnf.rtr_solicits = 0; | 406 | ndev->cnf.rtr_solicits = 0; |
407 | } | 407 | } |
408 | #endif | 408 | #endif |
@@ -551,7 +551,7 @@ void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp) | |||
551 | pr_notice("Timer is still running, when freeing ifa=%p\n", ifp); | 551 | pr_notice("Timer is still running, when freeing ifa=%p\n", ifp); |
552 | 552 | ||
553 | if (ifp->state != INET6_IFADDR_STATE_DEAD) { | 553 | if (ifp->state != INET6_IFADDR_STATE_DEAD) { |
554 | pr_warning("Freeing alive inet6 address %p\n", ifp); | 554 | pr_warn("Freeing alive inet6 address %p\n", ifp); |
555 | return; | 555 | return; |
556 | } | 556 | } |
557 | dst_release(&ifp->rt->dst); | 557 | dst_release(&ifp->rt->dst); |
@@ -841,8 +841,7 @@ retry: | |||
841 | in6_dev_hold(idev); | 841 | in6_dev_hold(idev); |
842 | if (idev->cnf.use_tempaddr <= 0) { | 842 | if (idev->cnf.use_tempaddr <= 0) { |
843 | write_unlock(&idev->lock); | 843 | write_unlock(&idev->lock); |
844 | printk(KERN_INFO | 844 | pr_info("%s: use_tempaddr is disabled\n", __func__); |
845 | "ipv6_create_tempaddr(): use_tempaddr is disabled.\n"); | ||
846 | in6_dev_put(idev); | 845 | in6_dev_put(idev); |
847 | ret = -1; | 846 | ret = -1; |
848 | goto out; | 847 | goto out; |
@@ -852,8 +851,8 @@ retry: | |||
852 | idev->cnf.use_tempaddr = -1; /*XXX*/ | 851 | idev->cnf.use_tempaddr = -1; /*XXX*/ |
853 | spin_unlock_bh(&ifp->lock); | 852 | spin_unlock_bh(&ifp->lock); |
854 | write_unlock(&idev->lock); | 853 | write_unlock(&idev->lock); |
855 | printk(KERN_WARNING | 854 | pr_warn("%s: regeneration time exceeded - disabled temporary address support\n", |
856 | "ipv6_create_tempaddr(): regeneration time exceeded. disabled temporary address support.\n"); | 855 | __func__); |
857 | in6_dev_put(idev); | 856 | in6_dev_put(idev); |
858 | ret = -1; | 857 | ret = -1; |
859 | goto out; | 858 | goto out; |
@@ -863,8 +862,8 @@ retry: | |||
863 | if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) { | 862 | if (__ipv6_try_regen_rndid(idev, tmpaddr) < 0) { |
864 | spin_unlock_bh(&ifp->lock); | 863 | spin_unlock_bh(&ifp->lock); |
865 | write_unlock(&idev->lock); | 864 | write_unlock(&idev->lock); |
866 | printk(KERN_WARNING | 865 | pr_warn("%s: regeneration of randomized interface id failed\n", |
867 | "ipv6_create_tempaddr(): regeneration of randomized interface id failed.\n"); | 866 | __func__); |
868 | in6_ifa_put(ifp); | 867 | in6_ifa_put(ifp); |
869 | in6_dev_put(idev); | 868 | in6_dev_put(idev); |
870 | ret = -1; | 869 | ret = -1; |
@@ -914,8 +913,7 @@ retry: | |||
914 | if (!ift || IS_ERR(ift)) { | 913 | if (!ift || IS_ERR(ift)) { |
915 | in6_ifa_put(ifp); | 914 | in6_ifa_put(ifp); |
916 | in6_dev_put(idev); | 915 | in6_dev_put(idev); |
917 | printk(KERN_INFO | 916 | pr_info("%s: retry temporary address regeneration\n", __func__); |
918 | "ipv6_create_tempaddr(): retry temporary address regeneration.\n"); | ||
919 | tmpaddr = &addr; | 917 | tmpaddr = &addr; |
920 | write_lock(&idev->lock); | 918 | write_lock(&idev->lock); |
921 | goto retry; | 919 | goto retry; |
@@ -1429,7 +1427,7 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp) | |||
1429 | /* DAD failed for link-local based on MAC address */ | 1427 | /* DAD failed for link-local based on MAC address */ |
1430 | idev->cnf.disable_ipv6 = 1; | 1428 | idev->cnf.disable_ipv6 = 1; |
1431 | 1429 | ||
1432 | printk(KERN_INFO "%s: IPv6 being disabled!\n", | 1430 | pr_info("%s: IPv6 being disabled!\n", |
1433 | ifp->idev->dev->name); | 1431 | ifp->idev->dev->name); |
1434 | } | 1432 | } |
1435 | } | 1433 | } |
@@ -1660,9 +1658,8 @@ static void ipv6_regen_rndid(unsigned long data) | |||
1660 | idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time - | 1658 | idev->cnf.regen_max_retry * idev->cnf.dad_transmits * idev->nd_parms->retrans_time - |
1661 | idev->cnf.max_desync_factor * HZ; | 1659 | idev->cnf.max_desync_factor * HZ; |
1662 | if (time_before(expires, jiffies)) { | 1660 | if (time_before(expires, jiffies)) { |
1663 | printk(KERN_WARNING | 1661 | pr_warn("%s: too short regeneration interval; timer disabled for %s\n", |
1664 | "ipv6_regen_rndid(): too short regeneration interval; timer disabled for %s.\n", | 1662 | __func__, idev->dev->name); |
1665 | idev->dev->name); | ||
1666 | goto out; | 1663 | goto out; |
1667 | } | 1664 | } |
1668 | 1665 | ||
@@ -2507,7 +2504,7 @@ static void addrconf_gre_config(struct net_device *dev) | |||
2507 | struct inet6_dev *idev; | 2504 | struct inet6_dev *idev; |
2508 | struct in6_addr addr; | 2505 | struct in6_addr addr; |
2509 | 2506 | ||
2510 | pr_info("ipv6: addrconf_gre_config(%s)\n", dev->name); | 2507 | pr_info("%s(%s)\n", __func__, dev->name); |
2511 | 2508 | ||
2512 | ASSERT_RTNL(); | 2509 | ASSERT_RTNL(); |
2513 | 2510 | ||
@@ -2599,9 +2596,7 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2599 | if (event == NETDEV_UP) { | 2596 | if (event == NETDEV_UP) { |
2600 | if (!addrconf_qdisc_ok(dev)) { | 2597 | if (!addrconf_qdisc_ok(dev)) { |
2601 | /* device is not ready yet. */ | 2598 | /* device is not ready yet. */ |
2602 | printk(KERN_INFO | 2599 | pr_info("ADDRCONF(NETDEV_UP): %s: link is not ready\n", |
2603 | "ADDRCONF(NETDEV_UP): %s: " | ||
2604 | "link is not ready\n", | ||
2605 | dev->name); | 2600 | dev->name); |
2606 | break; | 2601 | break; |
2607 | } | 2602 | } |
@@ -2626,10 +2621,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2626 | idev->if_flags |= IF_READY; | 2621 | idev->if_flags |= IF_READY; |
2627 | } | 2622 | } |
2628 | 2623 | ||
2629 | printk(KERN_INFO | 2624 | pr_info("ADDRCONF(NETDEV_CHANGE): %s: link becomes ready\n", |
2630 | "ADDRCONF(NETDEV_CHANGE): %s: " | 2625 | dev->name); |
2631 | "link becomes ready\n", | ||
2632 | dev->name); | ||
2633 | 2626 | ||
2634 | run_pending = 1; | 2627 | run_pending = 1; |
2635 | } | 2628 | } |
@@ -4757,8 +4750,8 @@ int __init addrconf_init(void) | |||
4757 | 4750 | ||
4758 | err = ipv6_addr_label_init(); | 4751 | err = ipv6_addr_label_init(); |
4759 | if (err < 0) { | 4752 | if (err < 0) { |
4760 | printk(KERN_CRIT "IPv6 Addrconf:" | 4753 | pr_crit("%s: cannot initialize default policy table: %d\n", |
4761 | " cannot initialize default policy table: %d.\n", err); | 4754 | __func__, err); |
4762 | goto out; | 4755 | goto out; |
4763 | } | 4756 | } |
4764 | 4757 | ||