addrconf.c (fdbdfefbabefcdf3f57560163b43fdc4cf95eb2f) | addrconf.c (bc561632dddd5af0c4444d919f01cbf6d553aa0a) |
---|---|
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 * --- 3529 unchanged lines hidden (view full) --- 3538 /* aggregate the system setting and interface setting */ 3539 _keep_addr = net->ipv6.devconf_all->keep_addr_on_down; 3540 if (!_keep_addr) 3541 _keep_addr = idev->cnf.keep_addr_on_down; 3542 3543 /* combine the user config with event to determine if permanent 3544 * addresses are to be removed from address hash table 3545 */ | 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 * --- 3529 unchanged lines hidden (view full) --- 3538 /* aggregate the system setting and interface setting */ 3539 _keep_addr = net->ipv6.devconf_all->keep_addr_on_down; 3540 if (!_keep_addr) 3541 _keep_addr = idev->cnf.keep_addr_on_down; 3542 3543 /* combine the user config with event to determine if permanent 3544 * addresses are to be removed from address hash table 3545 */ |
3546 keep_addr = !(how || _keep_addr <= 0); | 3546 keep_addr = !(how || _keep_addr <= 0 || idev->cnf.disable_ipv6); |
3547 3548 /* Step 2: clear hash table */ 3549 for (i = 0; i < IN6_ADDR_HSIZE; i++) { 3550 struct hlist_head *h = &inet6_addr_lst[i]; 3551 3552 spin_lock_bh(&addrconf_hash_lock); 3553restart: 3554 hlist_for_each_entry_rcu(ifa, h, addr_lst) { --- 39 unchanged lines hidden (view full) --- 3594 spin_unlock_bh(&ifa->lock); 3595 in6_ifa_put(ifa); 3596 write_lock_bh(&idev->lock); 3597 } 3598 3599 /* re-combine the user config with event to determine if permanent 3600 * addresses are to be removed from the interface list 3601 */ | 3547 3548 /* Step 2: clear hash table */ 3549 for (i = 0; i < IN6_ADDR_HSIZE; i++) { 3550 struct hlist_head *h = &inet6_addr_lst[i]; 3551 3552 spin_lock_bh(&addrconf_hash_lock); 3553restart: 3554 hlist_for_each_entry_rcu(ifa, h, addr_lst) { --- 39 unchanged lines hidden (view full) --- 3594 spin_unlock_bh(&ifa->lock); 3595 in6_ifa_put(ifa); 3596 write_lock_bh(&idev->lock); 3597 } 3598 3599 /* re-combine the user config with event to determine if permanent 3600 * addresses are to be removed from the interface list 3601 */ |
3602 keep_addr = (!how && _keep_addr > 0); | 3602 keep_addr = (!how && _keep_addr > 0 && !idev->cnf.disable_ipv6); |
3603 3604 INIT_LIST_HEAD(&del_list); 3605 list_for_each_entry_safe(ifa, tmp, &idev->addr_list, if_list) { 3606 struct rt6_info *rt = NULL; 3607 3608 addrconf_del_dad_work(ifa); 3609 3610 write_unlock_bh(&idev->lock); --- 2674 unchanged lines hidden --- | 3603 3604 INIT_LIST_HEAD(&del_list); 3605 list_for_each_entry_safe(ifa, tmp, &idev->addr_list, if_list) { 3606 struct rt6_info *rt = NULL; 3607 3608 addrconf_del_dad_work(ifa); 3609 3610 write_unlock_bh(&idev->lock); --- 2674 unchanged lines hidden --- |