addrconf.c (1cab3da6be6c7659f62d0d297b389cc0e48b2178) addrconf.c (389f661224cdbdf178553fb09a52dc6c8bf86890)
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 *

--- 2869 unchanged lines hidden (view full) ---

2878void if6_proc_exit(void)
2879{
2880 unregister_pernet_subsys(&if6_proc_net_ops);
2881}
2882#endif /* CONFIG_PROC_FS */
2883
2884#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
2885/* Check if address is a home address configured on any interface. */
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 *

--- 2869 unchanged lines hidden (view full) ---

2878void if6_proc_exit(void)
2879{
2880 unregister_pernet_subsys(&if6_proc_net_ops);
2881}
2882#endif /* CONFIG_PROC_FS */
2883
2884#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
2885/* Check if address is a home address configured on any interface. */
2886int ipv6_chk_home_addr(struct in6_addr *addr)
2886int ipv6_chk_home_addr(struct net *net, struct in6_addr *addr)
2887{
2888 int ret = 0;
2889 struct inet6_ifaddr * ifp;
2890 u8 hash = ipv6_addr_hash(addr);
2891 read_lock_bh(&addrconf_hash_lock);
2892 for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) {
2887{
2888 int ret = 0;
2889 struct inet6_ifaddr * ifp;
2890 u8 hash = ipv6_addr_hash(addr);
2891 read_lock_bh(&addrconf_hash_lock);
2892 for (ifp = inet6_addr_lst[hash]; ifp; ifp = ifp->lst_next) {
2893 if (ifp->idev->dev->nd_net != net)
2894 continue;
2893 if (ipv6_addr_cmp(&ifp->addr, addr) == 0 &&
2894 (ifp->flags & IFA_F_HOMEADDRESS)) {
2895 ret = 1;
2896 break;
2897 }
2898 }
2899 read_unlock_bh(&addrconf_hash_lock);
2900 return ret;

--- 1480 unchanged lines hidden ---
2895 if (ipv6_addr_cmp(&ifp->addr, addr) == 0 &&
2896 (ifp->flags & IFA_F_HOMEADDRESS)) {
2897 ret = 1;
2898 break;
2899 }
2900 }
2901 read_unlock_bh(&addrconf_hash_lock);
2902 return ret;

--- 1480 unchanged lines hidden ---