addrconf.c (122e4519cd5c224d4b8e681d368132b643e28f60) | addrconf.c (5b2a19539c5f59c5a038d213ede723f0245d97cf) |
---|---|
1/* 2 * IPv6 Address [auto]configuration 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 8 * --- 2725 unchanged lines hidden (view full) --- 2734 in6_dev_put(idev); 2735 } 2736 return 0; 2737} 2738 2739static void addrconf_rs_timer(unsigned long data) 2740{ 2741 struct inet6_ifaddr *ifp = (struct inet6_ifaddr *) data; | 1/* 2 * IPv6 Address [auto]configuration 3 * Linux INET6 implementation 4 * 5 * Authors: 6 * Pedro Roque <roque@di.fc.ul.pt> 7 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 8 * --- 2725 unchanged lines hidden (view full) --- 2734 in6_dev_put(idev); 2735 } 2736 return 0; 2737} 2738 2739static void addrconf_rs_timer(unsigned long data) 2740{ 2741 struct inet6_ifaddr *ifp = (struct inet6_ifaddr *) data; |
2742 struct inet6_dev *idev = ifp->idev; |
|
2742 | 2743 |
2743 if (ifp->idev->cnf.forwarding) | 2744 read_lock(&idev->lock); 2745 if (idev->dead || !(idev->if_flags & IF_READY)) |
2744 goto out; 2745 | 2746 goto out; 2747 |
2746 if (ifp->idev->if_flags & IF_RA_RCVD) { 2747 /* 2748 * Announcement received after solicitation 2749 * was sent 2750 */ | 2748 if (idev->cnf.forwarding) |
2751 goto out; | 2749 goto out; |
2752 } | |
2753 | 2750 |
2751 /* Announcement received after solicitation was sent */ 2752 if (idev->if_flags & IF_RA_RCVD) 2753 goto out; 2754 |
|
2754 spin_lock(&ifp->lock); | 2755 spin_lock(&ifp->lock); |
2755 if (ifp->probes++ < ifp->idev->cnf.rtr_solicits) { | 2756 if (ifp->probes++ < idev->cnf.rtr_solicits) { |
2756 /* The wait after the last probe can be shorter */ 2757 addrconf_mod_timer(ifp, AC_RS, | 2757 /* The wait after the last probe can be shorter */ 2758 addrconf_mod_timer(ifp, AC_RS, |
2758 (ifp->probes == ifp->idev->cnf.rtr_solicits) ? 2759 ifp->idev->cnf.rtr_solicit_delay : 2760 ifp->idev->cnf.rtr_solicit_interval); | 2759 (ifp->probes == idev->cnf.rtr_solicits) ? 2760 idev->cnf.rtr_solicit_delay : 2761 idev->cnf.rtr_solicit_interval); |
2761 spin_unlock(&ifp->lock); 2762 | 2762 spin_unlock(&ifp->lock); 2763 |
2763 ndisc_send_rs(ifp->idev->dev, &ifp->addr, &in6addr_linklocal_allrouters); | 2764 ndisc_send_rs(idev->dev, &ifp->addr, &in6addr_linklocal_allrouters); |
2764 } else { 2765 spin_unlock(&ifp->lock); 2766 /* 2767 * Note: we do not support deprecated "all on-link" 2768 * assumption any longer. 2769 */ 2770 printk(KERN_DEBUG "%s: no IPv6 routers present\n", | 2765 } else { 2766 spin_unlock(&ifp->lock); 2767 /* 2768 * Note: we do not support deprecated "all on-link" 2769 * assumption any longer. 2770 */ 2771 printk(KERN_DEBUG "%s: no IPv6 routers present\n", |
2771 ifp->idev->dev->name); | 2772 idev->dev->name); |
2772 } 2773 2774out: | 2773 } 2774 2775out: |
2776 read_unlock(&idev->lock); |
|
2775 in6_ifa_put(ifp); 2776} 2777 2778/* 2779 * Duplicate Address Detection 2780 */ 2781static void addrconf_dad_kick(struct inet6_ifaddr *ifp) 2782{ --- 1853 unchanged lines hidden --- | 2777 in6_ifa_put(ifp); 2778} 2779 2780/* 2781 * Duplicate Address Detection 2782 */ 2783static void addrconf_dad_kick(struct inet6_ifaddr *ifp) 2784{ --- 1853 unchanged lines hidden --- |